Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BlackMoonWolf/b0bf3b8bda3b5a08b55cbfe5a1621620 to your computer and use it in GitHub Desktop.
Save BlackMoonWolf/b0bf3b8bda3b5a08b55cbfe5a1621620 to your computer and use it in GitHub Desktop.
LED Control Script (ASUS AC3100, ASUSWRT)
#!/bin/sh
show_help()
{
echo "usage:"
echo "ledcontrol -on Turn leds on"
echo "ledcontrol -off Turn leds off"
echo ""
}
option="${1}"
case ${option} in
-on)
nvram set led_disable=0
service restart_leds
echo "Leds are now on"
logger "Leds: on"
;;
-off)
nvram set led_disable=1
service restart_leds
echo "Leds are now off"
logger "Leds: off"
;;
*) show_help
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment