perf(RESTORE): remove duplicate backup-location existence check

This commit is contained in:
Asif Bacchus 2021-02-08 10:28:21 -07:00
parent af4fcf3cf3
commit 78e1ed2539

View File

@ -251,11 +251,9 @@ fi
if [ ! -f "$mcDockerCompose" ]; then if [ ! -f "$mcDockerCompose" ]; then
consoleError '1' "docker-compose configuration ($mcDockerCompose) cannot be found." consoleError '1' "docker-compose configuration ($mcDockerCompose) cannot be found."
fi fi
# backup location? # forgot to set backup location?
if [ -z "$backupLocation" ]; then if [ -z "$backupLocation" ]; then
consoleError '1' "'--backup-location' cannot be unspecified or null/empty." consoleError '1' "'--backup-location' cannot be unspecified or null/empty."
elif [ ! -d "$backupLocation" ]; then
consoleError '1' "${backupLocation}: directory cannot be found."
fi fi
# change to mailcow directory so commands execute properly # change to mailcow directory so commands execute properly
\cd "${mcConfig%/*}" || consoleError '4' 'Cannot change to mailcow directory as determined from mailcow.conf location.' \cd "${mcConfig%/*}" || consoleError '4' 'Cannot change to mailcow directory as determined from mailcow.conf location.'