Fixed path to postgresql config script better
This commit is contained in:
parent
42937d4597
commit
a869c922c8
1 changed files with 10 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue