Skip to content
Snippets Groups Projects
Commit d33377e4 authored by Roland's avatar Roland
Browse files

echo-Statements from testing removed to make script smaller.

parent 85c8c8b3
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
if [ $(ps | grep -c "{$(basename $0)}") -gt 4 ]; then
echo started twice
exit 1
fi
if [ $(ps | grep -c "fastd") -lt 2 ]; then
echo fastd not running
exit 0
fi
if [ "$(uci get fastd.mesh_vpn_backbone.auto_segment)" = "0" ]; then
echo auto_segment disabled
exit 0
fi
......@@ -22,7 +19,6 @@ done
NODEID=ffs-$NODEID
SEGMENT=`nslookup $NODEID.segassign.freifunk-stuttgart.de [::1]:54 |tail -n1 `
if [[ -z "${SEGMENT// }" ]]; then
echo Node not known
exit 1
fi
SEGMENT=${SEGMENT/Address 1: 2001:2:0:711::/}
......@@ -44,5 +40,4 @@ done
if [ "$CHANGED" = "1" ]; then
/etc/init.d/fastd restart
echo Segment set to $SEGNUM
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment