summaryrefslogtreecommitdiff
path: root/bin/extra
diff options
context:
space:
mode:
Diffstat (limited to 'bin/extra')
-rwxr-xr-xbin/extra/aivpn30
-rwxr-xr-xbin/extra/ytplay2
2 files changed, 31 insertions, 1 deletions
diff --git a/bin/extra/aivpn b/bin/extra/aivpn
new file mode 100755
index 0000000..841d926
--- /dev/null
+++ b/bin/extra/aivpn
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+err() { printf "%s\n" "$@"; }
+
+if [ "$1" = "-k" ]
+then
+ pgrep -f -- "ssh.*-L.*vm" | xargs kill
+ exit
+fi
+
+err "I: Waiting for connectivity..."
+while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep "Permission denied" > /dev/null
+do sleep 1
+done
+
+
+export SSH_ASKPASS="sshpass"
+export SSH_ASKPASS_REQUIRE="prefer"
+export PASSWORD="zot/quickemu"
+
+err "I: Activating vpn"
+ssh vm "rasdial \"vpn.student.ehb.be\""
+
+keyadd ehb/ai
+ssh -f -N -L 2222:10.2.160.41:22 vm
+
+keyadd ehb/vm_int
+ssh -f -N -L 2223:10.2.160.9:22 vm
+ssh -f -N -L 2224:10.2.160.10:22 vm
+ssh -f -N -L 2225:10.2.160.11:22 vm
diff --git a/bin/extra/ytplay b/bin/extra/ytplay
index 66204c4..5243364 100755
--- a/bin/extra/ytplay
+++ b/bin/extra/ytplay
@@ -1,4 +1,4 @@
#!/bin/sh
url="$(ytlink)"
-notify-send "playing: $url" &
+herbe "playing: $url" &
yt-dlp -o - "$url" | mpv -