Check for config file

This commit is contained in:
Bob Mottram 2017-03-05 20:38:37 +00:00
parent 4cf81861a1
commit 74be19f042
1 changed files with 6 additions and 4 deletions

View File

@ -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