bugfix: CPE510: LINK1 LED doesn't illuminiate with neigbors in range

LINK1 LED was based on Ubiquiti file names, changed to determine base on file name instead.

This should open up more device support long term as well as solve the initial issue.
This commit is contained in:
Conrad Lara - KG6JEI 2015-04-06 11:57:37 -07:00
parent 5629ce93b7
commit b6805ca15f
1 changed files with 4 additions and 2 deletions

View File

@ -18,13 +18,15 @@
LICENSE
LINK1LED=`readlink -f /sys/class/leds/*link1`
{
while true; do
sleep 5;
if echo /neighbors | nc 127.0.0.1 2006 2>/dev/null | grep -q YES; then
echo 1 > /sys/class/leds/ubnt:red:link1/brightness
echo 1 > $LINK1LED/brightness
else
echo 0 > /sys/class/leds/ubnt:red:link1/brightness
echo 0 > $LINK1LED//brightness
fi
done;
} &