X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fmysql;h=cd2d491f0bb1cc27deb0ef5399d3c3af8ad9bce0;hb=0912bf6000029865500f0fe5428d846520ae8a4d;hp=8d59fa4b0cd1cb897b8199605930a604058adf6b;hpb=f06717699a7e31ca890b92f34560c902146a51ae;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/mysql b/handlers/mysql index 8d59fa4..cd2d491 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -51,13 +51,16 @@ fi # If needed, make sure that the specified vserver exists and is running. if [ $usevserver ] then - info "examining vserver '$vsname'" + 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` - [ "$running" = "1" ] || fatal "vserver $vsname is not running." + $VSERVERINFO -q $vsname RUNNING + if [ $? -ne 0 ] + then + fatal "vserver $vsname is not running." + fi fi # create backup dirs, the vroot variable will be empty if no vsname was specified