Last active
August 29, 2015 14:06
-
-
Save andreagrandi/c703e4e67c38fbecf340 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
keepalive_host='192.168.0.1' | |
ping -q -c1 $keepalive_host >> /dev/null | |
if [ "$?" -ne "0" ]; then | |
echo "`date` WIFI DOWN" >> wifi_log.txt | |
ifdown wlan0 | |
rmmod 8192cu | |
modprobe 8192cu | |
ifup wlan0 | |
echo "`date` WIFI UP" >> wifi_log.txt | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment