Created
August 23, 2016 06:20
-
-
Save BlackMoonWolf/b0bf3b8bda3b5a08b55cbfe5a1621620 to your computer and use it in GitHub Desktop.
LED Control Script (ASUS AC3100, ASUSWRT)
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 | |
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