diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-10 00:15:44 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-10-10 00:15:44 +0200 |
commit | c5461e289dcd7dab36d028aec5d3e1d0b8677f64 (patch) | |
tree | 8aa19401cf6bf3db9a1b2c4d4fa129b29122f4a1 /bin/extra | |
parent | b4f7c506a75d4d540b902d533bad3a733b976e27 (diff) |
added connectivity check
Diffstat (limited to 'bin/extra')
-rwxr-xr-x | bin/extra/aivpn | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/extra/aivpn b/bin/extra/aivpn index 14d176c..fd72ffb 100755 --- a/bin/extra/aivpn +++ b/bin/extra/aivpn @@ -23,6 +23,11 @@ export SSH_ASKPASS="$0" export SSH_ASKPASS_REQUIRE="prefer" export PASSWORD=zot/qemu +logn "I: Waiting for connectivity..." +while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep -q "Permission denied" +do sleep 1 +done + logn "I: Activating vpn" ssh vm "rasdial \"vpn.student.ehb.be\"" ssh -f -N \ |