3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # bacula This shell script takes care of starting and stopping
7 # the bacula Director daemon
9 # chkconfig: 2345 92 99
10 # description: The Leading Open Source Backup Solution.
12 # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
15 # Source function library
16 . /etc/rc.d/functions.bacula
21 [ -x ${BACDIRBIN}/bacula-dir ] && {
23 echo -n "Starting the Director daemon: "
25 if [ "${DIR_USER}" != '' ]; then
26 OPTIONS="${OPTIONS} -u ${DIR_USER}"
29 if [ "${DIR_GROUP}" != '' ]; then
30 OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
33 ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
39 [ -x ${BACDIRBIN}/bacula-dir ] && {
40 echo -n "Stopping the Director daemon: "
41 killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
53 [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
57 echo "Usage: $0 {start|stop|restart|status}"