aboutsummaryrefslogtreecommitdiff
path: root/handlers/pgsql
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2006-04-24 16:16:12 +0000
committerintrigeri <intrigeri@boum.org>2006-04-24 16:16:12 +0000
commita8c5734f5471c1578828662d1046e41aaf31cf99 (patch)
tree5797bec0752f06c1126afc0cd6f1e42336b7830f /handlers/pgsql
parent806d97652f404adacb83bce8ff843d8dabc2bf00 (diff)
downloadbackupninja-a8c5734f5471c1578828662d1046e41aaf31cf99.tar.gz
backupninja-a8c5734f5471c1578828662d1046e41aaf31cf99.tar.bz2
pgsql: postgres user UID is now the one from inside the vserver if necessary
Diffstat (limited to 'handlers/pgsql')
-rw-r--r--handlers/pgsql6
1 files changed, 5 insertions, 1 deletions
diff --git a/handlers/pgsql b/handlers/pgsql
index b67b3f1..0c72c82 100644
--- a/handlers/pgsql
+++ b/handlers/pgsql
@@ -61,7 +61,11 @@ fi
# give backup dir the good uid and permissions
# (in respect to the vserver, if $usevserver = yes)
-pguid=`getent passwd postgres | awk -F: '{print $3}'`
+if [ $usevserver = yes ]; then
+ pguid=`$VSERVER $vsname exec getent passwd postgres | awk -F: '{print $3}'`
+else
+ pguid=`getent passwd postgres | awk -F: '{print $3}'`
+fi
[ -n "$pguid" ] || \
fatal "No user called postgres`[ $usevserver = no ] || echo \" on vserver $vsname\"`."
debug "chown $pguid $vroot$backupdir"