Fixed tracker port

This commit is contained in:
Bob Mottram 2015-08-29 16:38:24 +01:00
parent 1d7c46db8f
commit 7b0b60bd72
1 changed files with 3 additions and 10 deletions

View File

@ -28,7 +28,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
TRANSMISSION_PORT= TRACKER_PORT=51413
BOOTSTRAP_FILE=/opt/zeronet/bootstrap BOOTSTRAP_FILE=/opt/zeronet/bootstrap
if [ ! -d /opt/zeronet ]; then if [ ! -d /opt/zeronet ]; then
@ -47,20 +47,13 @@ fi
state=0 state=0
address="" address=""
port=0
peer="" peer=""
while IFS='' read -r line || [[ -n "$line" ]]; do while IFS='' read -r line || [[ -n "$line" ]]; do
if [ ${state} -eq "3" ]; then
if [[ $line == *"port ="* ]]; then
port=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
echo "udp $address $port" >> $BOOTSTRAP_FILE.new
state=0
fi
fi
if [ ${state} -eq "2" ]; then if [ ${state} -eq "2" ]; then
if [[ $line == *"address ="* ]]; then if [[ $line == *"address ="* ]]; then
address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}') address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
state=3 echo "udp $address $TRACKER_PORT" >> $BOOTSTRAP_FILE.new
state=0
fi fi
fi fi
if [ ${state} -eq "1" ]; then if [ ${state} -eq "1" ]; then