diff --git a/backup_new.sh b/backup_new.sh index 6797e42..402d6cd 100755 --- a/backup_new.sh +++ b/backup_new.sh @@ -297,6 +297,22 @@ if [ "$offlineBackup" -eq 1 ]; then fi +### read details file to get variables needed to dump sql and run borg +printf "${cyan}[%s] -- [INFO] Reading configuration details file --${norm}\n" \ + "$(stamp)" >> "$logFile" +# check if config details file was provided as a relative or absolute path +case "${configDetails}" in + /*) + # absolute path, no need to rewrite variable + . "${configDetails}" + ;; + *) + # relative path, prepend './' to create absolute path + . "./${configDetails}" + ;; +esac +printf "${cyan}[%s] -- [INFO] ${yellow}%s${cyan} imported --${norm}\n" \ + "$(stamp)" "$configDetails" >> "$logFile"