aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2005-12-27 17:04:33 +0000
committerMicah Anderson <micah@riseup.net>2005-12-27 17:04:33 +0000
commit0e8c35b5c58232a98f4ac2a8f6a8e2b6dda5e8e6 (patch)
tree4f0951f11b12033de3e7497ad7361b9fc58b6f5b /handlers
parent429091fa8ab3feca1dafa22341dba47bca4e6e67 (diff)
downloadbackupninja-0e8c35b5c58232a98f4ac2a8f6a8e2b6dda5e8e6.tar.gz
backupninja-0e8c35b5c58232a98f4ac2a8f6a8e2b6dda5e8e6.tar.bz2
r208@um: micah | 2005-12-26 22:43:36 -0500
Fixed mysql check to see if vserver is running
Diffstat (limited to 'handlers')
-rw-r--r--handlers/mysql7
1 files changed, 5 insertions, 2 deletions
diff --git a/handlers/mysql b/handlers/mysql
index 8d59fa4..55bfb25 100644
--- a/handlers/mysql
+++ b/handlers/mysql
@@ -56,8 +56,11 @@ then
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 $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