From 9a363d8510929eb78166df231425adcc590a4b49 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 8 Feb 2021 07:11:47 -0700 Subject: [PATCH] fix(RESTORE): move path to pre-flight - export path so pre-flight checks are using consistent env --- .../.idea/codeStyles/codeStyleConfig.xml | 5 +++++ .idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml | 8 ++++++++ .idea/.idea.MailcowBackup.dir/.idea/riderModule.iml | 7 +++++++ .idea/.idea.MailcowBackup.dir/.idea/vcs.xml | 3 +++ backup/restore.sh | 4 +++- 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .idea/.idea.MailcowBackup.dir/.idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml create mode 100644 .idea/.idea.MailcowBackup.dir/.idea/riderModule.iml diff --git a/.idea/.idea.MailcowBackup.dir/.idea/codeStyles/codeStyleConfig.xml b/.idea/.idea.MailcowBackup.dir/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/.idea.MailcowBackup.dir/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml b/.idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml new file mode 100644 index 0000000..27ba142 --- /dev/null +++ b/.idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.MailcowBackup.dir/.idea/riderModule.iml b/.idea/.idea.MailcowBackup.dir/.idea/riderModule.iml new file mode 100644 index 0000000..1a4e0d9 --- /dev/null +++ b/.idea/.idea.MailcowBackup.dir/.idea/riderModule.iml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.MailcowBackup.dir/.idea/vcs.xml b/.idea/.idea.MailcowBackup.dir/.idea/vcs.xml index d4d4d27..45577ff 100644 --- a/.idea/.idea.MailcowBackup.dir/.idea/vcs.xml +++ b/.idea/.idea.MailcowBackup.dir/.idea/vcs.xml @@ -7,4 +7,7 @@ + + + \ No newline at end of file diff --git a/backup/restore.sh b/backup/restore.sh index 1bb7c60..01deaa6 100644 --- a/backup/restore.sh +++ b/backup/restore.sh @@ -160,6 +160,9 @@ while [ $# -gt 0 ]; do done ### pre-flight checks +# set path so checks are valid for this script environment +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + # docker installed? if ! command -v docker >/dev/null; then consoleError '3' 'docker does not seem to be installed!' @@ -184,7 +187,6 @@ fi ### read mailcow.conf and import vars # shellcheck source=./mailcow.conf.shellcheck . "$mcConfig" -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export COMPOSE_HTTP_TIMEOUT="$dockerStartTimeout" ### start logging