Compare commits

...

2 commits

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 < postgresql.cfg
done < "$config""
}
function runBackups() {