diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-20 12:04:39 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-20 12:04:39 +0200 |
commit | e5eb7f627f4632dab17e0cc0f727cb9b1f70d8a1 (patch) | |
tree | 75c7f8560539303e4a5c1f93241a1e8912bad4cc /bin/extra | |
parent | 05e1216b45340702f82a4946002015a05cebe9b1 (diff) | |
parent | 947f7df73f16981f170265a64a964142fc617023 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/extra')
-rwxr-xr-x | bin/extra/aivpn | 30 | ||||
-rwxr-xr-x | bin/extra/ytplay | 2 |
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 - |