]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/suse/bacula-dir.in
Fix setip crash + missing unlocks()+cleanups
[bacula/bacula] / bacula / platforms / suse / 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
13 RETVAL=0
14 case "$1" in
15     start)
16        echo -n "Starting the Bacula Director: "
17        /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
18        RETVAL=$?
19        echo
20        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
21        ;;
22     stop)
23        echo -n "Stopping the Director daemon: "
24        /sbin/killproc @sbindir@/bacula-dir
25        RETVAL=$?
26        echo
27        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
28        ;;
29     restart)
30        $0 stop
31        sleep 5
32        $0 start
33        ;;
34     status)
35        /sbin/checkproc @sbindir@/bacula-dir
36        ;;
37     *)
38        echo "Usage: $0 {start|stop|restart|status}"
39        exit 1
40        ;;
41 esac
42 exit 0