Created
December 24, 2019 11:18
-
-
Save vinliao/991cf08136a5865cc68d45da54f1ee19 to your computer and use it in GitHub Desktop.
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 | |
while true; | |
do | |
ping -c1 google.com | |
# if ping isn't successful | |
if [ $? -ne 0 ] | |
then | |
protonvpn c -r | |
# if first connect isn't succesful | |
# then connect again | |
while [ $? -ne 0 ]; | |
do | |
protonvpn c -r | |
done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment