Fixed bug in tunneldigger-watchdog which caused constant restarting of tunneldigger

This commit is contained in:
Cyrus Fox 2016-07-04 16:20:25 +02:00
parent 70013e9315
commit 4743883057

View File

@ -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