don't allow the Nextcloud container to start if the update failed

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-08-15 14:00:48 +02:00
parent 1411a0d8b1
commit 9f6c532170
3 changed files with 19 additions and 0 deletions

View file

@ -69,6 +69,10 @@ if [ "$DAILY_BACKUP" = 1 ]; then
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-nextcloud$" && ! nc -z nextcloud-aio-nextcloud 9000; do
echo "Waiting for the Nextcloud container to start"
sleep 30
if [ "$(docker inspect nextcloud-aio-nextcloud --format "{{.State.Restarting}}")" = "true" ]; then
echo "Nextcloud container restarting. Skipping this check!"
break
fi
done
fi
sudo -u www-data php /var/www/docker-aio/php/src/Cron/BackupNotification.php