From 00b51479e965d1159f4e8741d7cf2db4971365a1 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 6 Jan 2017 09:22:18 +0000 Subject: [PATCH] closes #103 --- scripts/pull | 2 +- scripts/start.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/pull b/scripts/pull index 7a057d3..c6451cc 100755 --- a/scripts/pull +++ b/scripts/pull @@ -11,5 +11,5 @@ if [ -z "$GIT_NAME" ]; then fi cd /var/www/html -git pull +git pull || exit 1 chown -Rf nginx:nginx /var/www/html diff --git a/scripts/start.sh b/scripts/start.sh index 6839197..1b0266d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -36,15 +36,15 @@ if [ ! -d "/var/www/html/.git" ]; then rm -Rf /var/www/html/* if [ ! -z "$GIT_BRANCH" ]; then if [ -z "$GIT_USERNAME" ] && [ -z "$GIT_PERSONAL_TOKEN" ]; then - git clone -b $GIT_BRANCH $GIT_REPO /var/www/html/ + git clone -b $GIT_BRANCH $GIT_REPO /var/www/html/ || exit 1 else - git clone -b ${GIT_BRANCH} https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO} /var/www/html + git clone -b ${GIT_BRANCH} https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO} /var/www/html || exit 1 fi else if [ -z "$GIT_USERNAME" ] && [ -z "$GIT_PERSONAL_TOKEN" ]; then - git clone $GIT_REPO /var/www/html/ + git clone $GIT_REPO /var/www/html/ || exit 1 else - git clone https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO} /var/www/html + git clone https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO} /var/www/html || exit 1 fi fi chown -Rf nginx.nginx /var/www/html