From 48c82cbfc5f3cf06096f504219b574cc952cd171 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 2 Aug 2023 09:51:39 +0200 Subject: [PATCH] better mailcow update with rerun on update of update.sh --- mailcow.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mailcow.yml b/mailcow.yml index daf1761..1b1fab8 100644 --- a/mailcow.yml +++ b/mailcow.yml @@ -169,7 +169,19 @@ if ./update.sh -c then g_echo_warn "Installiere MailCow Update $(./update.sh -c)" - ./update.sh --no-update-compose -f 2>&1 | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee $g_tmp/mailcow-update || g_echo_error "MailCow Update fehlgeschlagen $(cat $g_tmp/mailcow-update)" + if ! ./update.sh --no-update-compose -f 2>&1 | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee $g_tmp/mailcow-update + then + if grep -q "update.sh changed, please run this script again" $g_tmp/mailcow-update + then + if ! ./update.sh --no-update-compose -f 2>&1 | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/" | tee -a $g_tmp/mailcow-update + then + g_echo_error "MailCow Update fehlgeschlagen $(cat $g_tmp/mailcow-update)" + fi + else + g_echo_error "MailCow Update fehlgeschlagen $(cat $g_tmp/mailcow-update)" + fi + fi + docker compose up -d fi fi # take letsencrypt-certs from traefik