git-svn-id: http://code.autistici.org/svn/backupninja/trunk@392
758a04ac-41e6-0310-8a23-
8373a73cc35d
. Fixed inversed vsname emptiness check
. Fixed su quote usage to be more posixy
. Fixed shell expansion, thanks Thomas Kotzian (Closes: #363297)
+ . postgres user UID is now the one from inside the vserver if necessary
svn:
. Fixed inversed vsname emptiness check
rdiff:
# 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"