]> git.pld-linux.org Git - packages/bacula.git/blob - bacula-sd.init
00024d36f37cb567930926b8f246fdd1e6f41593
[packages/bacula.git] / bacula-sd.init
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
10 # Source function library
11 . /etc/rc.d/init.d/functions
12
13 case "$1" in
14     start)
15        msg_starting "Bacula Storage"
16        daemon /usr/sbin/bacula-sd $2 -c /etc/bacula/bacula-sd.conf
17        RETVAL=$?
18        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bacula-sd
19        ;;
20     stop)
21        msg_stopping "Bacula Storage"
22        killproc /usr/sbin/bacula-sd
23        RETVAL=$?
24        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bacula-sd
25        ;;
26     restart)
27        $0 stop && sleep 5
28        $0 start
29        RETVAL=$?
30        ;;
31     status)
32        status /usr/sbin/bacula-sd
33        RETVAL=$?
34        ;;
35     *)
36        echo "Usage: $0 {start|stop|restart|status}"
37        exit 1
38        ;;
39 esac
40 exit $RETVAL
This page took 0.10801 seconds and 2 git commands to generate.