From ed1abd4df8da3e5c594fba9659dd5e73cf2bfd66 Mon Sep 17 00:00:00 2001 From: Michiel de Jong <michiel@unhosted.org> Date: Tue, 28 Oct 2014 07:59:48 +0000 Subject: [PATCH] check that the default cert exists before continuing --- deploy/deploy.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 9fa0a71..1eaef96 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -20,11 +20,14 @@ if [ $# -ge 4 ]; then else USER="core" fi -if [ -e ../orchestration/per-server/$SERVER/default-site ]; then - DEFAULTSITE=`cat ../orchestration/per-server/$SERVER/default-site` -else + +if [ -e "${FOLDER}server-wide/haproxy/approved-certs/${SERVER}.pem" ]; then DEFAULTSITE=$SERVER +else + echo "Please make sure ${FOLDER}server-wide/haproxy/approved-certs/${SERVER}.pem exists, then retry" + exit 1 fi + echo "Hoster data folder is $FOLDER" echo "Infrastructure branch is $BRANCH" echo "Remote user is $USER" -- GitLab