Last active
August 29, 2015 14:24
-
-
Save RGreinacher/4ac7ef19f55ac60d69c9 to your computer and use it in GitHub Desktop.
Reup Linux WiFi connection
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/bash | |
# inspired by MrEngman; https://www.raspberrypi.org/forums/viewtopic.php?t=16054 | |
# set `sudo chmod +x ./network-manager.sh` and call it in `/etc/rc.local` | |
while true ; do | |
if ifconfig wlan0 | grep -q "inet addr:" ; then | |
sleep 60 | |
else | |
echo "Network connection down! Attempting reconnection." | |
ifup --force wlan0 | |
sleep 10 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment