From 54ca63657fcc1640753d8165908bbfddc3622df2 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 8 Feb 2021 09:21:25 -0700 Subject: [PATCH] fix(RESTORE): change to mc directory before imports --- backup/restore.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backup/restore.sh b/backup/restore.sh index c4726d4..a783e36 100644 --- a/backup/restore.sh +++ b/backup/restore.sh @@ -249,6 +249,8 @@ fi if [ ! -f "$mcDockerCompose" ]; then consoleError '1' "docker-compose configuration ($mcDockerCompose) cannot be found." fi +# change to mailcow directory so commands execute properly +\cd ${mcConfig%/*} || consoleError '4' 'Cannot change to mailcow directory as determined from mailcow.conf location.' ### read mailcow.conf and import vars # shellcheck source=./mailcow.conf.shellcheck