Bladeren bron

Data directory

Bob Mottram 8 jaren geleden
bovenliggende
commit
4b6a7febcf
1 gewijzigde bestanden met toevoegingen van 10 en 7 verwijderingen
  1. 10
    7
      src/freedombone-app-tahoelafs

+ 10
- 7
src/freedombone-app-tahoelafs Bestand weergeven

221
     cd /home/tahoelafs/tahoelafs
221
     cd /home/tahoelafs/tahoelafs
222
     git checkout $TAHOELAFS_COMMIT -b $TAHOELAFS_COMMIT
222
     git checkout $TAHOELAFS_COMMIT -b $TAHOELAFS_COMMIT
223
     git submodule update --init --recursive
223
     git submodule update --init --recursive
224
-    virtualenv venv
224
+    virtualenv venv --distribute
225
+    venv/bin/pip uninstall setuptools
225
     venv/bin/pip install setuptools==11.3
226
     venv/bin/pip install setuptools==11.3
226
     venv/bin/pip install six==1.10.0 packaging==16.8 attrs==16.3.0 appdirs==1.4.2 pycrypto==2.1.0 cffi==1.9.1
227
     venv/bin/pip install six==1.10.0 packaging==16.8 attrs==16.3.0 appdirs==1.4.2 pycrypto==2.1.0 cffi==1.9.1
227
-    venv/bin/pip install cryptography==1.7.2
228
+    venv/bin/pip install cryptography==1.7.2 markerlib==0.6.0 distribute==0.7.3
228
     venv/bin/pip install --editable .
229
     venv/bin/pip install --editable .
229
     configure_firewall_for_tahoelafs
230
     configure_firewall_for_tahoelafs
230
 
231
 
231
-    su -c "$TAHOE_COMMAND create-introducer /home/tahoelafs/.tahoe-introducer" - tahoelafs
232
+    if [ ! -d /home/tahoelafs/data ]; then
233
+        mkdir /home/tahoelafs/data
234
+    fi
235
+    chown -R tahoelafs:tahoelafs /home/tahoelafs
236
+    su -c "$TAHOE_COMMAND create-introducer -C /home/tahoelafs/data --hide-ip --hostname=127.0.0.1" - tahoelafs
232
     TAHOELAFS_CONFIG=/home/tahoelafs/.tahoe-introducer/tahoe.cfg
237
     TAHOELAFS_CONFIG=/home/tahoelafs/.tahoe-introducer/tahoe.cfg
233
     if [ ! -f $TAHOELAFS_CONFIG ]; then
238
     if [ ! -f $TAHOELAFS_CONFIG ]; then
234
         exit 62831
239
         exit 62831
237
     TAHOELAFS_ONION_HOSTNAME=$(add_onion_service tahoelafs ${TAHOELAFS_PORT} ${TAHOELAFS_ONION_PORT})
242
     TAHOELAFS_ONION_HOSTNAME=$(add_onion_service tahoelafs ${TAHOELAFS_PORT} ${TAHOELAFS_ONION_PORT})
238
     tahoelafs_setup_config $TAHOELAFS_CONFIG
243
     tahoelafs_setup_config $TAHOELAFS_CONFIG
239
 
244
 
240
-    chown -R tahoelafs:tahoelafs /home/tahoelafs
241
-
242
     TAHOELAFS_DAEMON_FILE=/etc/systemd/system/tahoelafs.service
245
     TAHOELAFS_DAEMON_FILE=/etc/systemd/system/tahoelafs.service
243
     echo '[Unit]' > $TAHOELAFS_DAEMON_FILE
246
     echo '[Unit]' > $TAHOELAFS_DAEMON_FILE
244
     echo 'Description=Tahoe-LAFS introducer' >> $TAHOELAFS_DAEMON_FILE
247
     echo 'Description=Tahoe-LAFS introducer' >> $TAHOELAFS_DAEMON_FILE
250
     echo "User=tahoelafs" >> $TAHOELAFS_DAEMON_FILE
253
     echo "User=tahoelafs" >> $TAHOELAFS_DAEMON_FILE
251
     echo "Group=tahoelafs" >> $TAHOELAFS_DAEMON_FILE
254
     echo "Group=tahoelafs" >> $TAHOELAFS_DAEMON_FILE
252
     echo "WorkingDirectory=/home/tahoelafs/tahoelafs" >> $TAHOELAFS_DAEMON_FILE
255
     echo "WorkingDirectory=/home/tahoelafs/tahoelafs" >> $TAHOELAFS_DAEMON_FILE
253
-    echo "ExecStart=venv/bin/tahoe start /home/tahoelafs/.tahoe-introducer" >> $TAHOELAFS_DAEMON_FILE
254
-    echo "ExecStop=venv/bin/tahoe stop /home/tahoelafs/.tahoe-introducer" >> $TAHOELAFS_DAEMON_FILE
256
+    echo "ExecStart=/home/tahoelafs/tahoelafs/venv/bin/tahoe start /home/tahoelafs/data/.tahoe-introducer" >> $TAHOELAFS_DAEMON_FILE
257
+    echo "ExecStop=/home/tahoelafs/tahoelafs/venv/bin/tahoe stop /home/tahoelafs/data/.tahoe-introducer" >> $TAHOELAFS_DAEMON_FILE
255
     echo 'Restart=on-failure' >> $TAHOELAFS_DAEMON_FILE
258
     echo 'Restart=on-failure' >> $TAHOELAFS_DAEMON_FILE
256
     echo "Environment=\"USER=tahoelafs\" \"HOME=/home/tahoelafs\"" >> $TAHOELAFS_DAEMON_FILE
259
     echo "Environment=\"USER=tahoelafs\" \"HOME=/home/tahoelafs\"" >> $TAHOELAFS_DAEMON_FILE
257
     echo '' >> $TAHOELAFS_DAEMON_FILE
260
     echo '' >> $TAHOELAFS_DAEMON_FILE