import config details file

This commit is contained in:
Asif Bacchus 2019-05-25 00:59:23 -06:00
parent 465b386796
commit c65c9113b8

View File

@ -297,6 +297,22 @@ if [ "$offlineBackup" -eq 1 ]; then
fi 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"