3 # bacula This shell script takes care of starting and stopping
4 # the bacula Storage 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 SD_OPTIONS, SD_USER, or SD_GROUP
26 [ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
31 if [ "${SD_USER}" != '' ]; then
32 SD_OPTIONS="${SD_OPTIONS} -u ${SD_USER}"
35 if [ "${SD_GROUP}" != '' ]; then
36 SD_OPTIONS="${SD_OPTIONS} -g ${SD_GROUP}"
39 echo -n "Starting Bacula Storage services: "
40 daemon @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf
43 [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
46 echo -n "Stopping Bacula Storage services: "
47 killproc @sbindir@/bacula-sd
50 [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-sd
58 status @sbindir@/bacula-sd
61 echo "Usage: $0 {start|stop|restart|status}"