Bläddra i källkod

Use zeronet trackers file

Bob Mottram 9 år sedan
förälder
incheckning
d048fa72db
3 ändrade filer med 4 tillägg och 7 borttagningar
  1. 1
    1
      src/freedombone
  2. 1
    1
      src/freedombone-meshweb
  3. 2
    5
      src/zeronetavahi

+ 1
- 1
src/freedombone Visa fil

@@ -1859,7 +1859,7 @@ function install_zeronet {
1859 1859
   echo 'User=zeronet' >> /etc/systemd/system/zeronet.service
1860 1860
   echo 'Group=zeronet' >> /etc/systemd/system/zeronet.service
1861 1861
   echo 'WorkingDirectory=/opt/zeronet' >> /etc/systemd/system/zeronet.service
1862
-  echo "ExecStart=/usr/bin/python zeronet.py --ip_external ${DEFAULT_DOMAIN_NAME}.local --config_file /opt/zeronet/zeronet.conf" >> /etc/systemd/system/zeronet.service
1862
+  echo "ExecStart=/usr/bin/python zeronet.py --ip_external ${DEFAULT_DOMAIN_NAME}.local --trackers_file /opt/zeronet/bootstrap" >> /etc/systemd/system/zeronet.service
1863 1863
   echo '' >> /etc/systemd/system/zeronet.service
1864 1864
   echo 'TimeoutSec=300' >> /etc/systemd/system/zeronet.service
1865 1865
   echo '' >> /etc/systemd/system/zeronet.service

+ 1
- 1
src/freedombone-meshweb Visa fil

@@ -323,7 +323,7 @@ zeronetavahi
323 323
 
324 324
 existing_zeronet=$(ps aux | grep zeronet | wc -l)
325 325
 if [ $existing_zeronet -lt "2" ]; then
326
-    python zeronet.py --ip_external $(hostname).local --config_file $ZERONET_DIR/zeronet.conf &
326
+    python zeronet.py --ip_external $(hostname).local --trackers_file $ZERONET_DIR/bootstrap &
327 327
 fi
328 328
 
329 329
 if which firefox > /dev/null; then

+ 2
- 5
src/zeronetavahi Visa fil

@@ -49,7 +49,7 @@ BLOGS_FILE=$ZERONET_INSTALL/freedombone-blogs
49 49
 FORUM_FILE=$ZERONET_INSTALL/freedombone-fora
50 50
 TOX_USERS_FILE=$ZERONET_INSTALL/freedombone-tox-users
51 51
 ZERONET_INDEX=/home/$MY_USERNAME/mesh.html
52
-ZERONET_CONFIG=$ZERONET_INSTALL/zeronet.conf
52
+ZERONET_CONFIG=$ZERONET_INSTALL/bootstrap
53 53
 
54 54
 function create_index {
55 55
     if [ -f $ZERONET_INDEX ]; then
@@ -123,9 +123,6 @@ if [ -f $ZERONET_CONFIG.new ]; then
123 123
     rm -f $ZERONET_CONFIG.new
124 124
 fi
125 125
 
126
-echo '[global]' > $ZERONET_CONFIG.new
127
-echo 'trackers =' >> $ZERONET_CONFIG.new
128
-
129 126
 state=0
130 127
 address=""
131 128
 peer=""
@@ -136,7 +133,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
136 133
             address=$(echo $line | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
137 134
             tracker_url="http://$peer:$TRACKER_PORT/announce"
138 135
             if ! grep -q "$tracker_url" $ZERONET_CONFIG.new; then
139
-                echo "    $tracker_url" >> $ZERONET_CONFIG.new
136
+                echo "$tracker_url" >> $ZERONET_CONFIG.new
140 137
                 tracker_ctr=$((tracker_ctr + 1))
141 138
             fi
142 139
             state=0