You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extra=$(echo "$QUERY_STRING" | sed -n 's/^.*extra=\([^&]*\).*$/\1/p' | sed "s/%20/ /g")
echo "extra is $extra "
newhaasnodeip=$(echo "$QUERY_STRING" | sed -n 's/^.*newhaasnodeip=\([^&]*\).*$/\1/p' | sed "s/%20/ /g")
echo "newhaasnodeip is $newhaasnodeip "
echo
#make /www/allnodes.txt
myip=`/root/script/myip.sh`
newnode="${newhaasnodeip}"
#the db of nodes is only kept on the hub
if [ `echo $myip | cut -f 4 -d . ` -eq 1 ]; then
touch /www/allnodes.txt
#if it's not already in there, add the new node to allnodes.txt
grep -x $newnode /www/allnodes.txt >/dev/null
if [ $? -eq 1 ]; then echo $newnode >> /www/allnodes.txt; fi
cat /www/allnodes.txt
#flush the arp cache of 192.168.2.19, every 10 seconds, for 2 minutes, since 192.168.2.19 has now become some other IP, and we want to be able to add a new node at 192.168.2.19 and have it connect to us