Last active
January 20, 2019 16:30
-
-
Save daniel-sc/6cd54a635dda9e4e0571194cc51175f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# copy to: /etc/cron.hourly/check-wlan | |
# test with: sudo run-parts --test /etc/cron.hourly | |
if ifconfig wlan0 | grep "inet addr:" ; then | |
logger "wifi ok" | |
exit | |
else | |
logger "Network down! Attempting reconnection." | |
ifup --force wlan0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment