Fixed path to postgresql config script better

This commit is contained in:
Eric Renfro 2023-12-13 02:25:13 -05:00
parent 42937d4597
commit a869c922c8
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -2,8 +2,17 @@
restoreDir=/etc/restore
pgsqlDir="$restoreDir/postgresql"
scriptDir="$(dirname "$0")"
function readConfig() {
local $config
if [[ -r "${scriptDir}/../config/postgresql.cfg" ]]; then
config="$(readlink -f "${scriptDir}/../config/postgresql.cfg")"
else
exit 2
fi
while read -r -a vals
do
[[ "${vals[*]}" =~ ^#.*$ ]] && continue
@ -11,7 +20,7 @@ function readConfig() {
if [[ "${vals[0]}" -ge 10 ]]; then
echo "${vals[@]}"
fi
done < /etc/resticprofile/config/postgresql.cfg
done < "$config""
}
function runBackups() {