Files
luci-app-internet-detector/led/etc/internet-detector/run-script
2021-10-31 20:07:17 +03:00

15 lines
356 B
Plaintext
Executable File

# Shell commands that are executed every time the Internet is checked for availability
#
# $1 : (0|1) - internet status: 0 is up, 1 is down
#
LEDN=1
LED_CMD="/usr/bin/internet-detector-led.sh"
LED_STATE=`$LED_CMD state $LEDN`
if [ $LED_STATE -eq 0 -a $1 -eq 0 ]; then
$LED_CMD on $LEDN
elif [ $LED_STATE -ne 0 -a $1 -eq 1 ]; then
$LED_CMD off $LEDN
fi