From 1095ba30661b50b30bc076257ec2ec4b3596d7a0 Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 20 Jun 2017 21:40:15 +0200 Subject: [PATCH] Fix ssl in update.sh --- update.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index f54c65af..81435ab7 100755 --- a/update.sh +++ b/update.sh @@ -4,6 +4,12 @@ set -o pipefail export LC_ALL=C DATE=$(date +%Y-%m-%d_%H_%M_%S) BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [[ -f mailcow.conf ]]; then + source mailcow.conf +else + echo -e "\e[31mNo mailcow.conf - is mailcow installed?\e[0m" + exit 1 +fi # Stopping mailcow docker-compose down @@ -15,10 +21,6 @@ if [[ ! -z $(docker images mailcow/${image} -q) ]]; then fi done -# Fix missing SSL, does not overwrite existing files -[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl -cp -n data/assets/ssl-example/*.pem data/assets/ssl/ - # Silently fixing remote url from andryyy to mailcow git remote set-url origin https://github.com/mailcow/mailcow-dockerized echo -e "\e[32mCommitting current status...\e[90m" @@ -45,3 +47,7 @@ echo # TODO: Menu, select hard reset, select reset to "before update" etc. #git reset --hard origin/${BRANCH} + +# Fix missing SSL, does not overwrite existing files +[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl +cp -n data/assets/ssl-example/*.pem data/assets/ssl/