v0.3. Internet detector daemon

This commit is contained in:
gSpot
2021-10-31 20:07:17 +03:00
parent 511dea9ee0
commit a008297225
34 changed files with 1917 additions and 143 deletions

View File

@@ -0,0 +1,14 @@
# 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