Skip to content
Snippets Groups Projects
Commit cf1817d0 authored by intrigeri's avatar intrigeri
Browse files

mysql and dup handlers: when using a vserver, check if it is running

parent bd0b2eae
Branches
Tags
No related merge requests found
......@@ -27,6 +27,8 @@ version 0.8 --
then nano, vim and vi, and aborts if none of these exists.
added helper for pgsql handler.
rdiff handler now does not require 'label'
changes to mysql and svn handlers' vservers support
these handlers now check if the source vserver is running
version 0.7 -- July 26 2005
added ninjahelper: a dialog based wizard for creating backupninja configs.
......
......@@ -39,11 +39,16 @@ then
fi
fi
# Check to make sure that the specified vserver exists
# If needed, make sure that the specified vserver exists and is running.
if [ $usevserver ]
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`
[ $running = 1 ] || fatal "vserver $vsname is not running."
fi
# create backup dirs, the vroot variable will be empty if no vsname was specified
......
#! /bin/sh
#
# PostgreSQL handler script for backupninja
#
......
......@@ -23,11 +23,16 @@ then
fi
fi
# Check to make sure that the specified vserver exists
# If needed, make sure that the specified vserver exists and is running.
if [ $usevserver ]
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`
[ $running = 1 ] || fatal "vserver $vsname is not running."
fi
cd $vroot$src
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment