-
-
Save amiraliakbari/c32ad4706be5b8cd4559 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
VPN="Sharif ID" | |
trap "exit 0" SIGINT SIGTERM | |
while true; do | |
if ! nmcli con status | grep "$VPN" &>/dev/null; then | |
echo "[`date -R`] Trying to re-connect..." | |
nmcli -p con up id "$VPN" | |
fi | |
sleep 3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment