3 # Bacula(R) - The Network Backup Solution
5 # Copyright (C) 2000-2016 Kern Sibbald
7 # The original author of Bacula is Kern Sibbald, with contributions
8 # from many others, a complete list can be found in the file AUTHORS.
10 # You may use this file and others of this release according to the
11 # license defined in the LICENSE file, which includes the Affero General
12 # Public License, v3.0 ("AGPLv3") and some additional permissions and
13 # terms pursuant to its AGPLv3 Section 7.
15 # This notice must be preserved when any source code is
16 # conveyed and/or propagated.
18 # Bacula(R) is a registered trademark of Kern Sibbald.
20 # bacula This shell script takes care of starting and stopping
23 # This is pretty much watered down version of the RedHat script
24 # that works on Solaris as well as Linux, but it won't work everywhere.
26 # description: The Leading Open Source Backup Solution.
29 # All these are not *really* needed but it makes it
30 # easier to "steal" this code for the development
31 # environment where they are different.
35 # Disable Glibc malloc checks, it doesn't help and it keeps from getting
42 [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
43 [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
44 [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
48 # Stop the FD first so that SD will fail jobs and update catalog
49 [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
50 [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
51 [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
61 [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status
62 [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status
63 [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status
67 echo "Usage: $0 {start|stop|restart|status}"