From cc1268a8b6acf1f3858bd97c7413006a568f6c50 Mon Sep 17 00:00:00 2001 From: MrGeneration Date: Wed, 7 Aug 2019 12:37:45 +0200 Subject: [PATCH] Fixes #2508: Change into backup directory This fix ensures that the backup-script will change into the backup directory before running. Users backup via root user will no longer get a warning, that the script couldn't change into '/root' --- contrib/backup/zammad_backup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/backup/zammad_backup.sh b/contrib/backup/zammad_backup.sh index 6ef7a57be..0e33ca328 100755 --- a/contrib/backup/zammad_backup.sh +++ b/contrib/backup/zammad_backup.sh @@ -7,6 +7,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin: BACKUP_SCRIPT_PATH="$(dirname $(realpath $0))" if [ -f "${BACKUP_SCRIPT_PATH}/config" ]; then + # Ensure we're inside of our Backup-Script folder (see issue 2508) + cd "${BACKUP_SCRIPT_PATH}" + # import config . ${BACKUP_SCRIPT_PATH}/config else