From c22cea54014470b0b6593ef7dc3170529582e316 Mon Sep 17 00:00:00 2001
From: FFS-Roland <ffs-monitor@gmx.de>
Date: Tue, 12 Sep 2017 23:51:00 +0200
Subject: [PATCH] Disable watchdog while SSH connection exists.

---
 ffs-watchdog/files/usr/sbin/ffs-watchdog | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ffs-watchdog/files/usr/sbin/ffs-watchdog b/ffs-watchdog/files/usr/sbin/ffs-watchdog
index 5d1f6ac..084977e 100755
--- a/ffs-watchdog/files/usr/sbin/ffs-watchdog
+++ b/ffs-watchdog/files/usr/sbin/ffs-watchdog
@@ -7,7 +7,8 @@ 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
+   [ "$(uci get system.@system[0].enable_watchdog)" != "0" ] &&
+   [ "$(netstat -nt | grep -c ':22')" = "0" ]; then
   NOW=$(date +%s)
   if [ -n "$(batctl gwl | grep '=>')" ]; then
     echo $NOW >$FFS
-- 
GitLab