mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-06 03:26:50 +03:00
15 lines
356 B
Plaintext
Executable File
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
|