From cab1844db656030ab14b54c898a247673de92c38 Mon Sep 17 00:00:00 2001 From: FFS-Roland <ffs-monitor@gmx.de> Date: Tue, 12 Sep 2017 23:03:25 +0200 Subject: [PATCH] removing control file with timestamp if watchdog is disabled. --- ffs-watchdog/files/usr/sbin/ffs-watchdog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ffs-watchdog/files/usr/sbin/ffs-watchdog b/ffs-watchdog/files/usr/sbin/ffs-watchdog index 6fe0366..5d1f6ac 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 -- GitLab