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