Added new neighbor check to tunneldigger-watchdog
This commit is contained in:
parent
d01fdcec02
commit
fefe847525
@ -1,7 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PIDFILE=/var/run/tunneldigger.mesh-vpn.pid
|
PIDFILE=/var/run/tunneldigger.mesh-vpn.pid
|
||||||
|
|
||||||
if [ "$(pgrep tunneldigger)" != "$(cat $PIDFILE)" ] && [ "$(uci get tunneldigger.@broker[0].enabled)" == "1" ]; then
|
if [ "$(uci get tunneldigger.@broker[0].enabled)" == "1" ]; then
|
||||||
|
if [ "$(pgrep tunneldigger)" != "$(cat $PIDFILE)" ]; then
|
||||||
/etc/init.d/tunneldigger restart
|
/etc/init.d/tunneldigger restart
|
||||||
logger -t tunneldiger-watchdog "Restarted Tunneldigger"
|
logger -t tunneldiger-watchdog "Daemon not running, restarted tunneldigger."
|
||||||
|
elif [ "$(batctl o |grep mesh-vpn |wc -l)" == "0" ]; then
|
||||||
|
/etc/init.d/tunneldigger restart
|
||||||
|
logger -t tunneldiger-watchdog "No neighbours on mesh-vpn interface, restarted tunneldigger."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user