3 # bacula This shell script takes care of starting and stopping
4 # the bacula Director daemon
7 # description: It comes by night and sucks the vital essence from your computers.
9 # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
12 # Source function library
13 . /etc/rc.d/init.d/functions
20 # if /lib/tls exists, force Bacula to use the glibc pthreads instead
21 if [ -d "/lib/tls" -a $OS = "Linux" -a `uname -r | cut -c1-3` = "2.4" ] ; then
22 export LD_ASSUME_KERNEL=2.4.19
25 # pull in any user defined DIR_DIR_OPTIONS, DIR_USER, or DIR_GROUP
26 [ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
31 if [ "${DIR_USER}" != '' ]; then
32 DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
35 if [ "${DIR_GROUP}" != '' ]; then
36 DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
38 echo -n "Starting Bacula Director services: "
39 daemon @sbindir@/bacula-dir $2 ${DIR_OPTIONS} -c @sysconfdir@/bacula-dir.conf
42 [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
45 echo -n "Stopping Bacula Director services: "
46 killproc @sbindir@/bacula-dir
49 [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
57 status @sbindir@/bacula-dir
60 echo "Usage: $0 {start|stop|restart|status}"