From 82db19a336788f2cd2b25e6e8b44c76525ddf005 Mon Sep 17 00:00:00 2001 From: Cyrus Fox Date: Mon, 4 Jul 2016 16:20:25 +0200 Subject: [PATCH] Fixed bug in tunneldigger-watchdog which caused constant restarting of tunneldigger --- gluon-tunneldigger-watchdog/files/usr/bin/tunneldigger-watchdog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon-tunneldigger-watchdog/files/usr/bin/tunneldigger-watchdog b/gluon-tunneldigger-watchdog/files/usr/bin/tunneldigger-watchdog index efa2ea9..8b26212 100755 --- a/gluon-tunneldigger-watchdog/files/usr/bin/tunneldigger-watchdog +++ b/gluon-tunneldigger-watchdog/files/usr/bin/tunneldigger-watchdog @@ -2,7 +2,7 @@ PIDFILE=/var/run/tunneldigger.mesh-vpn.pid if [ "$(uci get tunneldigger.@broker[0].enabled)" == "1" ]; then - if [ "$(pgrep tunneldigger)" != "$(cat $PIDFILE)" ]; then + if [ "$(pgrep tunneldigger | head -n 1)" != "$(cat $PIDFILE)" ]; then /etc/init.d/tunneldigger restart logger -t tunneldiger-watchdog "Daemon not running, restarted tunneldigger." elif [ "$(batctl o |grep mesh-vpn |wc -l)" == "0" ]; then