]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/redhat/bacula-dir.in
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / platforms / redhat / bacula-dir.in
1 #! /bin/sh
2 #
3 # bacula       This shell script takes care of starting and stopping
4 #              the bacula Director daemon
5 #
6 # chkconfig: 2345 90 99
7 # description: It comes by night and sucks the vital essence from your computers.
8 #
9 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
10 #
11
12 # Source function library
13 . /etc/rc.d/init.d/functions
14
15 RETVAL=0
16 case "$1" in
17     start)
18        echo -n "Starting the Bacula Director: "
19        daemon @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
20        RETVAL=$?
21        echo
22        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
23        ;;
24     stop)
25        echo -n "Stopping the Director daemon: "
26        killproc @sbindir@/bacula-dir
27        RETVAL=$?
28        echo
29        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
30        ;;
31     restart)
32        $0 stop
33        sleep 5
34        $0 start
35        ;;
36     status)
37        status @sbindir@/bacula-dir
38        ;;
39     *)
40        echo "Usage: $0 {start|stop|restart|status}"
41        exit 1
42        ;;
43 esac
44 exit 0