Ver código fonte

Check for config file

Bob Mottram 8 anos atrás
pai
commit
74be19f042
1 arquivos alterados com 6 adições e 4 exclusões
  1. 6
    4
      src/freedombone-app-tahoelafs

+ 6
- 4
src/freedombone-app-tahoelafs Ver arquivo

230
 function create_tahoelafs_introducer {
230
 function create_tahoelafs_introducer {
231
     introducer_dir="$1"
231
     introducer_dir="$1"
232
 
232
 
233
-    if [ -d ${introducer_dir} ]; then
233
+    if [ -f ${introducer_dir}/tahoe.cfg ]; then
234
         return
234
         return
235
     fi
235
     fi
236
 
236
 
247
         return
247
         return
248
     fi
248
     fi
249
 
249
 
250
-    if [ -d ${node_dir} ]; then
250
+    if [ -f ${node_dir}/tahoe.cfg ]; then
251
         return
251
         return
252
     fi
252
     fi
253
 
253
 
264
         return
264
         return
265
     fi
265
     fi
266
 
266
 
267
-    if [ -d ${client_dir} ]; then
267
+    if [ -f ${client_dir}/tahoe.cfg ]; then
268
         return
268
         return
269
     fi
269
     fi
270
 
270
 
343
     create_tahoelafs_introducer /home/tahoelafs/introducer
343
     create_tahoelafs_introducer /home/tahoelafs/introducer
344
     TAHOELAFS_INTRODUCER_CONFIG=/home/tahoelafs/introducer/tahoe.cfg
344
     TAHOELAFS_INTRODUCER_CONFIG=/home/tahoelafs/introducer/tahoe.cfg
345
     if [ ! -f $TAHOELAFS_INTRODUCER_CONFIG ]; then
345
     if [ ! -f $TAHOELAFS_INTRODUCER_CONFIG ]; then
346
+        echo $'Unable to create introducer'
346
         exit 62831
347
         exit 62831
347
     fi
348
     fi
348
 
349
 
352
     create_tahoelafs_storage_node /home/tahoelafs/storage "$(get_tahoelafs_introducer)"
353
     create_tahoelafs_storage_node /home/tahoelafs/storage "$(get_tahoelafs_introducer)"
353
     TAHOELAFS_STORAGE_CONFIG=/home/tahoelafs/storage/tahoe.cfg
354
     TAHOELAFS_STORAGE_CONFIG=/home/tahoelafs/storage/tahoe.cfg
354
     if [ ! -f $TAHOELAFS_STORAGE_CONFIG ]; then
355
     if [ ! -f $TAHOELAFS_STORAGE_CONFIG ]; then
356
+        echo $'Unable to create storage node'
355
         exit 782523
357
         exit 782523
356
     fi
358
     fi
357
 
359
 
364
     TAHOELAFS_INTRODUCER=/home/tahoelafs/introducer/tahoe-introducer.tac
366
     TAHOELAFS_INTRODUCER=/home/tahoelafs/introducer/tahoe-introducer.tac
365
     if [ ! -f $TAHOELAFS_INTRODUCER ]; then
367
     if [ ! -f $TAHOELAFS_INTRODUCER ]; then
366
         echo $'Introducer file not found'
368
         echo $'Introducer file not found'
367
-        exit 782253
369
+        exit 9654845
368
     fi
370
     fi
369
 
371
 
370
     # start the storage node
372
     # start the storage node