fixed if statement in start script

This commit is contained in:
Ric Harvey
2017-02-07 11:37:11 +00:00
parent e6da096f0e
commit 869483e5a2

View File

@@ -5,6 +5,10 @@
mkdir -p -m 0700 /root/.ssh mkdir -p -m 0700 /root/.ssh
echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
if [[ "$GIT_USE_SSH" == "1" ]] ; then
echo -e "Host *\n\tUser ${GIT_USERNAME}\n\n" >> /root/.ssh/config
fi
if [ ! -z "$SSH_KEY" ]; then if [ ! -z "$SSH_KEY" ]; then
echo $SSH_KEY > /root/.ssh/id_rsa.base64 echo $SSH_KEY > /root/.ssh/id_rsa.base64
base64 -d /root/.ssh/id_rsa.base64 > /root/.ssh/id_rsa base64 -d /root/.ssh/id_rsa.base64 > /root/.ssh/id_rsa
@@ -47,6 +51,7 @@ if [ ! -d "/var/www/html/.git" ]; then
else else
GIT_COMMAND=${GIT_COMMAND}" https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO}" GIT_COMMAND=${GIT_COMMAND}" https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO}"
fi fi
fi
${GIT_COMMAND} /var/www/html || exit 1 ${GIT_COMMAND} /var/www/html || exit 1
chown -Rf nginx.nginx /var/www/html chown -Rf nginx.nginx /var/www/html
fi fi