Skip to content

Instantly share code, notes, and snippets.

@DzikuVx
Created August 13, 2014 12:48
Show Gist options
  • Save DzikuVx/4f98334a7f5889a7324e to your computer and use it in GitHub Desktop.
Save DzikuVx/4f98334a7f5889a7324e to your computer and use it in GitHub Desktop.
#!/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