From 84605567cdb56860ec95e54667ccbeb3136a23ee Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 9 Feb 2021 05:59:37 -0700 Subject: [PATCH] feature(RESTORE): restart mailcow after completion --- backup/restore.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backup/restore.sh b/backup/restore.sh index f6d3448..2bc918b 100644 --- a/backup/restore.sh +++ b/backup/restore.sh @@ -553,8 +553,11 @@ if [ "$restoreRedis" -eq 1 ]; then esac fi -#TODO: restart docker containers -#TODO: optionally reindex dovecot (parameter) +### restart mailcow +if ! docker-compose up -d > /dev/null 2>&1; then + writeLog 'warn' '21' "Unable to automatically start mailcow containers. Please attempt a manual start and note any errors." + warnCount=$((warnCount+1)) +fi ### exit gracefully if [ "$errorCount" -gt 0 ]; then @@ -582,6 +585,7 @@ fi # 13: restoring SQL dump was unsuccessful # 2x: Docker/Docker-Compose errors # 20: cannot bring docker container(s) down successfully +# 21: cannot bring docker container(s) up successfully # 5x: File restore errors # 51: cannot locate source files in backup directory # 52: error restoring one or more files