Created
August 28, 2016 10:42
-
-
Save atopuzov/a0cae15972e599bdc7bade4a531a524b 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 | |
. /lib/functions/network.sh | |
network_find_wan wan_if | |
network_get_device wan_if_dev $wan_if | |
if ! ping -I $wan_if_dev -q -c 1 -W 10 8.8.8.8 > /dev/null | |
then | |
echo "Lost internet connectivity. Reconnecting." | logger -t "tester[$$]" -p info | |
(ifup $wan_if) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment