diff --git a/ffs-watchdog/files/usr/sbin/ffs-watchdog b/ffs-watchdog/files/usr/sbin/ffs-watchdog index 6fe036602e988a433c8b583dbc99ac0aeb8187b7..5d1f6ac6ca2eb6fbbd86780c5db0dd7c9dc10d05 100755 --- a/ffs-watchdog/files/usr/sbin/ffs-watchdog +++ b/ffs-watchdog/files/usr/sbin/ffs-watchdog @@ -5,9 +5,9 @@ if [ $(ps | grep -c "$ME") -gt 4 ]; then exit 1 fi +FFS=/tmp/.gw.ffs if [ "$(uci get gluon-setup-mode.@setup_mode[0].enabled)" = "0" ] && [ "$(uci get system.@system[0].enable_watchdog)" != "0" ]; then - FFS=/tmp/.gw.ffs NOW=$(date +%s) if [ -n "$(batctl gwl | grep '=>')" ]; then echo $NOW >$FFS @@ -25,4 +25,7 @@ if [ "$(uci get gluon-setup-mode.@setup_mode[0].enabled)" = "0" ] && echo $NOW >$FFS fi fi +else + rm $FFS + logger -t $ME "disabled" fi