Created
August 13, 2014 12:48
-
-
Save DzikuVx/4f98334a7f5889a7324e 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/sh | |
tries=0 | |
while [[ $tries -lt 5 ]] | |
do | |
if /bin/ping -c 1 8.8.8.8 >/dev/null | |
then | |
exit 0 | |
fi | |
tries=$((tries+1)) | |
done | |
ifdown wan | |
sleep 5 | |
ifup wan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment