From 74be19f0427cba726b2df0addd92467c4fcb1d8a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 5 Mar 2017 20:38:37 +0000 Subject: [PATCH] Check for config file --- src/freedombone-app-tahoelafs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index b242e11b..4ebbdac6 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -230,7 +230,7 @@ function install_tahoelafs_to_directory { function create_tahoelafs_introducer { introducer_dir="$1" - if [ -d ${introducer_dir} ]; then + if [ -f ${introducer_dir}/tahoe.cfg ]; then return fi @@ -247,7 +247,7 @@ function create_tahoelafs_storage_node { return fi - if [ -d ${node_dir} ]; then + if [ -f ${node_dir}/tahoe.cfg ]; then return fi @@ -264,7 +264,7 @@ function create_tahoelafs_client { return fi - if [ -d ${client_dir} ]; then + if [ -f ${client_dir}/tahoe.cfg ]; then return fi @@ -343,6 +343,7 @@ function install_tahoelafs { create_tahoelafs_introducer /home/tahoelafs/introducer TAHOELAFS_INTRODUCER_CONFIG=/home/tahoelafs/introducer/tahoe.cfg if [ ! -f $TAHOELAFS_INTRODUCER_CONFIG ]; then + echo $'Unable to create introducer' exit 62831 fi @@ -352,6 +353,7 @@ function install_tahoelafs { create_tahoelafs_storage_node /home/tahoelafs/storage "$(get_tahoelafs_introducer)" TAHOELAFS_STORAGE_CONFIG=/home/tahoelafs/storage/tahoe.cfg if [ ! -f $TAHOELAFS_STORAGE_CONFIG ]; then + echo $'Unable to create storage node' exit 782523 fi @@ -364,7 +366,7 @@ function install_tahoelafs { TAHOELAFS_INTRODUCER=/home/tahoelafs/introducer/tahoe-introducer.tac if [ ! -f $TAHOELAFS_INTRODUCER ]; then echo $'Introducer file not found' - exit 782253 + exit 9654845 fi # start the storage node