3 # bacula This shell script takes care of starting and stopping
4 # the bacula File 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 FD_OPTIONS, FD_USER, FD_GROUP
26 [ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
29 # Disable Glibc malloc checks, it doesn't help and it keeps from getting
37 if [ "${FD_USER}" != '' ]; then
38 FD_OPTIONS="${FD_OPTIONS} -u ${FD_USER}"
41 if [ "${FD_GROUP}" != '' ]; then
42 FD_OPTIONS="${FD_OPTIONS} -g ${FD_GROUP}"
44 echo -n "Starting Bacula File services: "
45 daemon @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf
48 [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
51 echo -n "Stopping Bacula File services: "
52 killproc @sbindir@/bacula-fd
55 [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
63 status @sbindir@/bacula-fd
66 echo "Usage: $0 {start|stop|restart|status}"