X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fpgsql.in;h=f334bf2fffedbee12148b2a29e55c75f6b62d189;hb=fc4d3185e41742984adc39a22f53ee1c96ff1e86;hp=23e2c2b42f0553864846b1fba38c91d5d4469e1f;hpb=2bca513c38c70cd7a56bef23512183629e91bade;p=matthijs%2Fupstream%2Fbackupninja-vserver.git 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)