Skip to content

Instantly share code, notes, and snippets.

@alexalouit
Created April 9, 2016 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexalouit/0fa5d3726f7bf6e80b2dd1fdc5c39d98 to your computer and use it in GitHub Desktop.
Save alexalouit/0fa5d3726f7bf6e80b2dd1fdc5c39d98 to your computer and use it in GitHub Desktop.
Connection status on ddwrt wrt54gsv4 led
#!/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