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
|
restoreDir=/etc/restore
|
||||||
pgsqlDir="$restoreDir/postgresql"
|
pgsqlDir="$restoreDir/postgresql"
|
||||||
|
scriptDir="$(dirname "$0")"
|
||||||
|
|
||||||
function readConfig() {
|
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
|
while read -r -a vals
|
||||||
do
|
do
|
||||||
[[ "${vals[*]}" =~ ^#.*$ ]] && continue
|
[[ "${vals[*]}" =~ ^#.*$ ]] && continue
|
||||||
|
@ -11,7 +20,7 @@ function readConfig() {
|
||||||
if [[ "${vals[0]}" -ge 10 ]]; then
|
if [[ "${vals[0]}" -ge 10 ]]; then
|
||||||
echo "${vals[@]}"
|
echo "${vals[@]}"
|
||||||
fi
|
fi
|
||||||
done < /etc/resticprofile/config/postgresql.cfg
|
done < "$config""
|
||||||
}
|
}
|
||||||
|
|
||||||
function runBackups() {
|
function runBackups() {
|
||||||
|
|
Loading…
Reference in a new issue