Created
March 5, 2015 14:20
-
-
Save juanedi/54f798945e51896c2db2 to your computer and use it in GitHub Desktop.
raspi network monitor
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 | |
check_wlan0 () { | |
return `ifconfig wlan0 | grep -q "inet addr:"` | |
} | |
if ! check_wlan0 ; then | |
sudo ifup --force wlan0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment