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
19 # if /lib/tls exists, force Bacula to use the glibc pthreads instead
20 if [ -d "/lib/tls" -a $OS = "Linux" -a `uname -r | cut -c1-3` = "2.4" ] ; then
21 export LD_ASSUME_KERNEL=2.4.19
27 if [ "${SD_USER}" != '' ]; then
28 OPTIONS="${OPTIONS} -u ${SD_USER}"
31 if [ "${SD_GROUP}" != '' ]; then
32 OPTIONS="${OPTIONS} -g ${SD_GROUP}"
35 echo -n "Starting Bacula Storage services: "
36 daemon @sbindir@/bacula-sd $2 ${OPTIONS} -c @sysconfdir@/bacula-sd.conf
39 [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
42 echo -n "Stopping Bacula Storage services: "
43 killproc @sbindir@/bacula-sd
46 [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-sd
54 status @sbindir@/bacula-sd
57 echo "Usage: $0 {start|stop|restart|status}"