aboutsummaryrefslogtreecommitdiff
path: root/handlers/pgsql
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2006-01-19 21:57:54 +0000
committerintrigeri <intrigeri@boum.org>2006-01-19 21:57:54 +0000
commitd600ba40c040c6a75a5b817f80184f60d9dc6eaf (patch)
tree609fde4330d67175478e2c4cc6b9307300de4525 /handlers/pgsql
parente5098e0cce4702e1f51c05020fe73e7f6a2f9f85 (diff)
downloadbackupninja-d600ba40c040c6a75a5b817f80184f60d9dc6eaf.tar.gz
backupninja-d600ba40c040c6a75a5b817f80184f60d9dc6eaf.tar.bz2
handlers/pgsql: make more use of the new lib/vserver functionality
Diffstat (limited to 'handlers/pgsql')
-rw-r--r--handlers/pgsql10
1 files changed, 4 insertions, 6 deletions
diff --git a/handlers/pgsql b/handlers/pgsql
index 63062f7..8629260 100644
--- a/handlers/pgsql
+++ b/handlers/pgsql
@@ -10,12 +10,12 @@ getconf vsname
localhost=`hostname`
-# If vservers are configured, decide if the handler should
-# use them or if it should just operate on the host
+# If vservers are enabled, check that $vsname exists, and decide if the
+# handler should use it or if it should just operate on the host.
local usevserver=no
if [ $vservers_are_available = yes ]; then
if ! vservers_exist "$vsname" ; then
- fatal "At least one of the vservers listed in vsnames ($vsnames) does not exist."
+ fatal "The vserver given in vsname ($vsname) does not exist."
else
info "using vserver '$vsname'"
usevserver=yes
@@ -23,13 +23,11 @@ if [ $vservers_are_available = yes ]; then
fi
# As needed, make sure that :
-# * the specified vserver exists and is running
+# * the specified vserver is running
# * the specified vserver or host has the needed executables
if [ $usevserver = yes ]; then
info "examining vserver '$vsname'"
- # does it exist ?
vroot="$VROOTDIR/$vsname"
- [ -d $vroot ] || fatal "vserver '$vsname' does not exist at '$vroot'"
# is it running ?
running=`$VSERVERINFO $vsname RUNNING`
if [ "$running" = "1" ]; then