X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fpgsql.in;h=f334bf2fffedbee12148b2a29e55c75f6b62d189;hp=23e2c2b42f0553864846b1fba38c91d5d4469e1f;hb=0a6abfc3cef116a69c7a4c8a820a08406432b46f;hpb=579ea902ba24854b3c9acb307cda7e996e8e41a3 diff --git a/handlers/pgsql.in b/handlers/pgsql.in index 23e2c2b..f334bf2 100644 --- a/handlers/pgsql.in +++ b/handlers/pgsql.in @@ -21,10 +21,7 @@ if [ $vservers_are_available = yes ]; then fatal "The vserver given in vsname ($vsname) does not exist." fi # is it running ? - $VSERVERINFO -q $vsname RUNNING - if [ $? -ne 0 ]; then - fatal "The vserver $vsname is not running." - fi + vservers_running $vsname || fatal "The vserver $vsname is not running." # everything ok info "Using vserver '$vsname'." usevserver=yes @@ -57,7 +54,7 @@ fi # create backup dir, the vroot variable will be empty if no vsname was specified # and will proceed to operate on the host [ -d $vroot$backupdir ] || (debug "mkdir -p $vroot$backupdir"; mkdir -p $vroot$backupdir) -[ -d $vroot$backupdir ] || fatal "Backup directory '$vroot$backupdir'" +[ -d $vroot$backupdir ] || fatal "Backup directory '$vroot$backupdir' does not exist, and could not be created." # give backup dir the good uid and permissions # (in respect to the vserver, if $usevserver = yes)