Further changes to update.sh

master
andryyy 2017-06-20 22:17:41 +02:00
parent 1095ba3066
commit cbc4e31b4e
1 changed files with 12 additions and 0 deletions

View File

@ -1,9 +1,19 @@
#!/bin/bash #!/bin/bash
echo -en "Checking internet connection... "
timeout 1 bash -c "echo >/dev/tcp/8.8.8.8/53"
if [[ $? != 0 ]]; then
echo -e "\e[31mfailed\e[0m"
exit 1
else
echo -e "\e[32mOK\e[0m"
fi
set -o pipefail set -o pipefail
export LC_ALL=C export LC_ALL=C
DATE=$(date +%Y-%m-%d_%H_%M_%S) DATE=$(date +%Y-%m-%d_%H_%M_%S)
BRANCH=$(git rev-parse --abbrev-ref HEAD) BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ -f mailcow.conf ]]; then if [[ -f mailcow.conf ]]; then
source mailcow.conf source mailcow.conf
else else
@ -51,3 +61,5 @@ echo
# Fix missing SSL, does not overwrite existing files # Fix missing SSL, does not overwrite existing files
[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl [[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl
cp -n data/assets/ssl-example/*.pem data/assets/ssl/ cp -n data/assets/ssl-example/*.pem data/assets/ssl/
docker-compose up -d