#! /bin/sh # # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # # chkconfig: 2345 90 9 # description: The Leading Open Source Backup Solution. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # SD_USER=@sd_user@ SD_GROUP=@sd_group@ SD_OPTIONS='' case "$1" in start) if [ "${SD_USER}" != '' ]; then SD_OPTIONS="${SD_OPTIONS} -u ${SD_USER}" fi if [ "${SD_GROUP}" != '' ]; then SD_OPTIONS="${SD_OPTIONS} -g ${SD_GROUP}" fi echo "Starting the Bacula Storage daemon: " @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf ;; stop) echo "Stopping the Bacula Storage daemon: " pkill -x bacula-sd ;; restart) $0 stop sleep 5 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0