From ad4b4c61fdc92efd28724f7ac728404ee8236b61 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 28 Jul 2017 20:16:20 +0100 Subject: [PATCH] Check directories --- src/freedombone-app-keyserver | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/freedombone-app-keyserver b/src/freedombone-app-keyserver index 78362cca..33f5ff4f 100755 --- a/src/freedombone-app-keyserver +++ b/src/freedombone-app-keyserver @@ -243,12 +243,11 @@ function install_keyserver { cd $INSTALL_DIR/keyserver git pull else - if [ -d $INSTALL_DIR/keyserver ]; then - cd $INSTALL_DIR/keyserver - pull - else - git_clone $KEYSERVER_SKS_REPO $INSTALL_DIR/keyserver - fi + git_clone $KEYSERVER_SKS_REPO keyserver + fi + if [ ! -d $INSTALL_DIR/keyserver ]; then + echo $"$INSTALL_DIR/keyserver not found" + exit 835274 fi cd $INSTALL_DIR/keyserver @@ -268,6 +267,10 @@ function install_keyserver { else git_clone $KEYSERVER_WEB_REPO htdocs fi + if [ ! -d /var/www/$KEYSERVER_DOMAIN_NAME/htdocs ]; then + echo $"/var/www/$KEYSERVER_DOMAIN_NAME/htdocs not found" + exit 6539230 + fi cd /var/www/$KEYSERVER_DOMAIN_NAME/htdocs git checkout $KEYSERVER_WEB_COMMIT -b $KEYSERVER_WEB_COMMIT