Skip to content
Snippets Groups Projects
Commit bb7af177 authored by Bob Mottram's avatar Bob Mottram
Browse files

Try http access to tracker announce

parent df44ae5f
No related branches found
No related tags found
No related merge requests found
......@@ -341,6 +341,7 @@ function mesh_batman {
echo " iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
echo " iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
echo " iptables -A INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
echo " iptables -A INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
echo " iptables -A INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
echo " iptables -A INPUT -p tcp --dport 80 -j ACCEPT" >> $batman_script
echo '' >> $batman_script
......@@ -384,6 +385,7 @@ function mesh_batman {
echo " iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
echo " iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
echo " iptables -D INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
echo " iptables -D INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
echo " iptables -D INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
echo " iptables -D INPUT -p tcp --dport 80 -j ACCEPT" >> $batman_script
echo '' >> $batman_script
......
......@@ -56,7 +56,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
if [ ${state} -eq "2" ]; then
if [[ $line == *"address ="* ]]; then
address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
echo "udp $peer $TRACKER_PORT" >> $BOOTSTRAP_FILE.new
echo "http $peer:$TRACKER_PORT/announce None" >> $BOOTSTRAP_FILE.new
state=0
fi
fi
......@@ -74,6 +74,8 @@ done < "$TEMPFILE"
rm -f $TEMPFILE
cp -f $BOOTSTRAP_FILE.new $BOOTSTRAP_FILE
rm -f $BOOTSTRAP_FILE.new
sudo chown zeronet:zeronet $BOOTSTRAP_FILE
if [ -d /home/zeronet ]; then
sudo chown zeronet:zeronet $BOOTSTRAP_FILE
fi
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment