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