Fixed tracker port
This commit is contained in:
parent
1d7c46db8f
commit
7b0b60bd72
|
@ -28,7 +28,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
TRANSMISSION_PORT=
|
||||
TRACKER_PORT=51413
|
||||
BOOTSTRAP_FILE=/opt/zeronet/bootstrap
|
||||
|
||||
if [ ! -d /opt/zeronet ]; then
|
||||
|
@ -47,20 +47,13 @@ fi
|
|||
|
||||
state=0
|
||||
address=""
|
||||
port=0
|
||||
peer=""
|
||||
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 [[ $line == *"address ="* ]]; then
|
||||
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
|
||||
if [ ${state} -eq "1" ]; then
|
||||
|
|
Loading…
Reference in New Issue