Skip to content
Snippets Groups Projects
Commit 07a06615 authored by FFS-Roland's avatar FFS-Roland
Browse files

modified condition to detect not running fastd.

parent 84bdc4a7
No related branches found
No related tags found
No related merge requests found
......@@ -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::/}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment