From: Jo-Philipp Wich Date: Sat, 16 May 2009 17:59:30 +0000 (+0000) Subject: contrib/package/freifunk-watchdog: reset hysteresis counter if test condition is... X-Git-Tag: 0.9.0~446 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6a9d7ac70c824b18aecdbf858e07612e066e094e;p=oweals%2Fluci.git contrib/package/freifunk-watchdog: reset hysteresis counter if test condition is normal --- diff --git a/contrib/package/freifunk-watchdog/src/watchdog.c b/contrib/package/freifunk-watchdog/src/watchdog.c index b5a573d49..a0d4e43b1 100644 --- a/contrib/package/freifunk-watchdog/src/watchdog.c +++ b/contrib/package/freifunk-watchdog/src/watchdog.c @@ -347,10 +347,14 @@ static int do_daemon(void) /* Check crond */ if( find_process("crond") < 0 ) restart_cron++; + else + restart_cron = 0; /* Check SSHd */ if( find_process("dropbear") < 0 ) restart_sshd++; + else + restart_sshd = 0; /* Check wireless interfaces */ ifs = load_wifi_uci(ifs, &modtime);