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'
This commit is contained in:
parent
54d590491e
commit
cc1268a8b6
1 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:
|
||||||
BACKUP_SCRIPT_PATH="$(dirname $(realpath $0))"
|
BACKUP_SCRIPT_PATH="$(dirname $(realpath $0))"
|
||||||
|
|
||||||
if [ -f "${BACKUP_SCRIPT_PATH}/config" ]; then
|
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
|
# import config
|
||||||
. ${BACKUP_SCRIPT_PATH}/config
|
. ${BACKUP_SCRIPT_PATH}/config
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue