Ver código fonte

Fixed tracker port

Bob Mottram 9 anos atrás
pai
commit
7b0b60bd72
1 arquivos alterados com 3 adições e 10 exclusões
  1. 3
    10
      src/zeronetavahi

+ 3
- 10
src/zeronetavahi Ver arquivo

28
 # You should have received a copy of the GNU General Public License
28
 # You should have received a copy of the GNU General Public License
29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
-TRANSMISSION_PORT=
31
+TRACKER_PORT=51413
32
 BOOTSTRAP_FILE=/opt/zeronet/bootstrap
32
 BOOTSTRAP_FILE=/opt/zeronet/bootstrap
33
 
33
 
34
 if [ ! -d /opt/zeronet ]; then
34
 if [ ! -d /opt/zeronet ]; then
47
 
47
 
48
 state=0
48
 state=0
49
 address=""
49
 address=""
50
-port=0
51
 peer=""
50
 peer=""
52
 while IFS='' read -r line || [[ -n "$line" ]]; do
51
 while IFS='' read -r line || [[ -n "$line" ]]; do
53
-    if [ ${state} -eq "3" ]; then
54
-        if [[ $line == *"port ="* ]]; then
55
-            port=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
56
-            echo "udp $address $port" >> $BOOTSTRAP_FILE.new
57
-            state=0
58
-        fi
59
-    fi
60
     if [ ${state} -eq "2" ]; then
52
     if [ ${state} -eq "2" ]; then
61
         if [[ $line == *"address ="* ]]; then
53
         if [[ $line == *"address ="* ]]; then
62
             address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
54
             address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
63
-            state=3
55
+            echo "udp $address $TRACKER_PORT" >> $BOOTSTRAP_FILE.new
56
+            state=0
64
         fi
57
         fi
65
     fi
58
     fi
66
     if [ ${state} -eq "1" ]; then
59
     if [ ${state} -eq "1" ]; then