From c65c9113b8b202901e2a6eab8b102b736b3083a9 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sat, 25 May 2019 00:59:23 -0600 Subject: [PATCH] import config details file --- backup_new.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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"