Created
April 9, 2016 12:48
-
-
Save alexalouit/0fa5d3726f7bf6e80b2dd1fdc5c39d98 to your computer and use it in GitHub Desktop.
Connection status on ddwrt wrt54gsv4 led
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/sh | |
# led is white if we have internet, turn orange if not. | |
while true ; do | |
if /bin/ping -qc 3 8.8.8.8 > /dev/null; then | |
/sbin/gpio disable 2 | |
/sbin/gpio enable 3 | |
else | |
/sbin/gpio disable 2 | |
/sbin/gpio disable 3 | |
fi | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment