-
-
Save fdoliv/0748a2c4b0fa34ca7a3e18e5d68b8d5f to your computer and use it in GitHub Desktop.
Fixes Forticlient 7.0.7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Try to connect to the VPN now" | |
x=99 | |
while [ $x -ne 0 ] | |
do | |
echo "Waiting for VPN connection..." | |
sleep 1 | |
connection=$(nmcli connection show | grep -oP '^vpn\S*') | |
x=$? | |
done | |
echo "VPN connection $connection was created! Waiting for 'device-reapply'..." | |
x=99 | |
while [ $x -ne 0 ] | |
do | |
nmcli -f GENERAL.STATE con show $connection 2> /dev/null | |
x=${PIPESTATUS[0]} | |
sleep 1 | |
echo "Still waiting..." | |
done | |
echo "Device is unmanaged. Setting it to 'up' again..." | |
nmcli con up $connection 2> /dev/null | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment