better mailcow update with rerun on update of update.sh

This commit is contained in:
olli 2023-08-02 09:51:39 +02:00
parent 9a63b2781f
commit 48c82cbfc5

View File

@ -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