Shamelessly stolen from https://community.ui.com/stories/Repurposing-a-second-UniFi-Cloud-Key-as-a-DNS-Recursor-Radius-and-NTP-server/56605e0f-401f-4397-8c05-5b1cbe118bf6
# vi /sbin/led-tool | |
#!/bin/bash | |
# Shamelessly stolen from https://community.ui.com/stories/Repurposing-a-second-UniFi-Cloud-Key-as-a-DNS-Recursor-Radius-and-NTP-server/56605e0f-401f-4397-8c05-5b1cbe118bf6 | |
if [ "$1" == "blue" ]; then | |
echo "Enabling steady blue LED" | |
echo 0 > /sys/class/leds/ubnt:white:dome/brightness | |
cat /sys/class/leds/ubnt:blue:dome/max_brightness > /sys/class/leds/ubnt:blue:dome/brightness | |
elif [ "$1" == "white" ]; then | |
echo "Enabling flashing white LED" | |
echo 0 > /sys/class/leds/ubnt:blue:dome/brightness | |
echo timer > /sys/class/leds/ubnt:white:dome/trigger | |
echo 750 > /sys/class/leds/ubnt:white:dome/delay_off | |
echo 750 > /sys/class/leds/ubnt:white:dome/delay_on | |
else | |
echo "ERROR: Unrecognized led $1" | |
exit 3 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment