Selaa lähdekoodia

Bad sed syntax

Bob Mottram 8 vuotta sitten
vanhempi
commit
392dd085fe
1 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 6
    6
      src/freedombone-app-tahoelafs

+ 6
- 6
src/freedombone-app-tahoelafs Näytä tiedosto

63
     if ! grep -q "reveal-IP-address" $config_file; then
63
     if ! grep -q "reveal-IP-address" $config_file; then
64
         sed -i '/[node]/a reveal-IP-address = False' $config_file
64
         sed -i '/[node]/a reveal-IP-address = False' $config_file
65
     else
65
     else
66
-        sed -i 's|reveal-IP-address.*|reveal-IP-address = False|g' >> $config_file
66
+        sed -i 's|reveal-IP-address.*|reveal-IP-address = False|g' $config_file
67
     fi
67
     fi
68
 
68
 
69
     if ! grep -q "tcp =" $config_file; then
69
     if ! grep -q "tcp =" $config_file; then
70
         sed -i '/[connections]/a tcp = tor' $config_file
70
         sed -i '/[connections]/a tcp = tor' $config_file
71
     else
71
     else
72
-        sed -i 's|tcp =.*|tcp = tor|g' >> $config_file
72
+        sed -i 's|tcp =.*|tcp = tor|g' $config_file
73
     fi
73
     fi
74
 
74
 
75
     if ! grep -q "tub.location =" $config_file; then
75
     if ! grep -q "tub.location =" $config_file; then
76
-        sed -i '/[node]/a tub.location = disabled' >> $config_file
76
+        sed -i '/[node]/a tub.location = disabled' $config_file
77
     fi
77
     fi
78
     if ! grep -q "tub.port =" $config_file; then
78
     if ! grep -q "tub.port =" $config_file; then
79
-        sed -i "/[node]/a tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1" >> $config_file
79
+        sed -i "/[node]/a tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1" $config_file
80
     fi
80
     fi
81
-    sed -i "s|tub.port.*|tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1|g" >> $config_file
82
-    sed -i "s|tub.location.*|tub.location = tor:${TAHOELAFS_ONION_HOSTNAME}:${TAHOELAFS_PORT}|g" >> $config_file
81
+    sed -i "s|tub.port.*|tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1|g" $config_file
82
+    sed -i "s|tub.location.*|tub.location = tor:${TAHOELAFS_ONION_HOSTNAME}:${TAHOELAFS_PORT}|g" $config_file
83
 
83
 
84
     sed -i "s|nickname =.*|nickname = $HOSTNAME|g" $config_file
84
     sed -i "s|nickname =.*|nickname = $HOSTNAME|g" $config_file
85
 
85