Commit 07a06615 authored by FFS-Roland's avatar FFS-Roland

modified condition to detect not running fastd.

parent 84bdc4a7
......@@ -4,7 +4,7 @@ if [ $(ps | grep -c "$ME") -gt 4 ]; then
logger -s -t $ME "started twice"
exit 1
fi
if [ $(ps | grep -c "fastd") -lt 2 ]; then
if [ ! -d "/proc/$(cat /var/run/fastd.mesh_vpn.pid)" ]; then
logger -t $ME "fastd not running"
exit 0
fi
......@@ -17,7 +17,7 @@ NODEID=$(uci get network.bat0.macaddr | sed 's/://g')
PUBKEY=$(/etc/init.d/fastd show_key mesh_vpn | cut -c1-12)
SEGINFO=$(nslookup ffs-${NODEID}-${PUBKEY}.segassign.freifunk-stuttgart.de [::1]:54 | grep "2001:2:0:711::")
if [ -z "$SEGINFO" ]; then
logger -t $ME "Node not known"
logger -t $ME "Node not registered"
exit 1
fi
SEGINFO=${SEGINFO/Address 1: 2001:2:0:711::/}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment