Bob Mottram 8 yıl önce
ebeveyn
işleme
00aceb2946
1 değiştirilmiş dosya ile 13 ekleme ve 13 silme
  1. 13
    13
      src/freedombone-app-tahoelafs

+ 13
- 13
src/freedombone-app-tahoelafs Dosyayı Görüntüle

@@ -283,7 +283,7 @@ function create_tahoelafs_daemon {
283 283
     daemon_name=$1
284 284
 
285 285
     TAHOELAFS_DAEMON_FILE=/etc/systemd/system/tahoelafs_${daemon_name}.service
286
-    echo "$TAHOELAFS_DAEMON_FILE"
286
+    echo "Creating daemon: $TAHOELAFS_DAEMON_FILE"
287 287
 
288 288
     echo '[Unit]' > $TAHOELAFS_DAEMON_FILE
289 289
     echo "Description=Tahoe-LAFS ${daemon_name}" >> $TAHOELAFS_DAEMON_FILE
@@ -348,16 +348,6 @@ function install_tahoelafs {
348 348
         exit 62831
349 349
     fi
350 350
 
351
-    if [ ! -d /home/tahoelafs/storage ]; then
352
-        mkdir /home/tahoelafs/storage
353
-    fi
354
-    create_tahoelafs_storage_node /home/tahoelafs/storage "$(get_tahoelafs_introducer)"
355
-    TAHOELAFS_STORAGE_CONFIG=/home/tahoelafs/storage/tahoe.cfg
356
-    if [ ! -f $TAHOELAFS_STORAGE_CONFIG ]; then
357
-        echo $'Unable to create storage node'
358
-        exit 782523
359
-    fi
360
-
361 351
     # create an onion address
362 352
     TAHOELAFS_ONION_HOSTNAME=$(add_onion_service tahoelafs ${TAHOELAFS_PORT} ${TAHOELAFS_ONION_PORT})
363 353
 
@@ -369,11 +359,21 @@ function install_tahoelafs {
369 359
         echo $'Introducer file not found'
370 360
         exit 9654845
371 361
     fi
372
-    create_tahoelafs_daemon introducer
362
+    create_tahoelafs_daemon "introducer"
373 363
 
374 364
     # start the storage node
365
+    if [ ! -d /home/tahoelafs/storage ]; then
366
+        mkdir /home/tahoelafs/storage
367
+    fi
368
+    create_tahoelafs_storage_node /home/tahoelafs/storage "$(get_tahoelafs_introducer)"
369
+    TAHOELAFS_STORAGE_CONFIG=/home/tahoelafs/storage/tahoe.cfg
370
+    if [ ! -f $TAHOELAFS_STORAGE_CONFIG ]; then
371
+        echo $'Unable to create storage node'
372
+        exit 782523
373
+    fi
374
+
375 375
     su -c '/home/tahoelafs/tahoelafs/venv/bin/python2 /home/tahoelafs/tahoelafs/venv/bin/tahoe start /home/tahoelafs/storage' - tahoelafs
376
-    create_tahoelafs_daemon storage
376
+    create_tahoelafs_daemon "storage"
377 377
 
378 378
     set_completion_param "tahoelafs commit" "$TAHOELAFS_COMMIT"
379 379