Skip to content

Instantly share code, notes, and snippets.

@MichalPekala
Created February 28, 2013 23:45
Show Gist options
  • Save MichalPekala/5061160 to your computer and use it in GitHub Desktop.
Save MichalPekala/5061160 to your computer and use it in GitHub Desktop.
Raspberry Pi WiFi Network Monitor
#!/bin/bash
while true ; do
if ifconfig wlan0 | grep -q "inet addr:" ; then
sleep 60
else
echo "WiFi 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