#! /bin/sh # # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # # chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release 3.0.3 (18 October 2009) -- mandrake # ### BEGIN INIT INFO # Provides: bacula-sd # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: bacula storage daemon # Description: Bacula network backup system storage daemon ### END INIT INFO # Source function library . /etc/rc.d/init.d/functions case "$1" in start) gprintf "Starting the Bacula Storage daemon: " daemon /usr/sbin/bacula-sd $2 -c /etc/bacula/bacula-sd.conf RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bacula-sd ;; stop) gprintf "Stopping the Bacula Storage daemon: " killproc /usr/sbin/bacula-sd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bacula-sd ;; restart) $0 stop sleep 5 $0 start ;; status) status /usr/sbin/bacula-sd ;; *) gprintf "Usage: %s {start|stop|restart|status}\n" "$0" exit 1 ;; esac exit 0