]> git.pld-linux.org Git - packages/bacula.git/blob - bacula-dir.init
- update for PLD
[packages/bacula.git] / bacula-dir.init
1 #! /bin/sh
2 #
3 # bacula       This shell script takes care of starting and stopping
4 #              the bacula Director daemon
5 #
6 # chkconfig: 2345 92 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 RETVAL=0
14 case "$1" in
15     start)
16        msg_starting "Bacula Director"
17        daemon /usr/sbin//bacula-dir $2 -c /etc/bacula/bacula-dir.conf
18        RETVAL=$?
19        echo
20        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bacula-dir
21        ;;
22     stop)
23        msg_stopping "Director daemon"
24        killproc /usr/sbin//bacula-dir
25        RETVAL=$?
26        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bacula-dir
27        ;;
28     restart)
29        $0 stop && sleep 5
30        $0 start
31        RETVAL=$?
32        ;;
33     status)
34        status /usr/sbin/bacula-dir
35        ;;
36     *)
37        echo "Usage: $0 {start|stop|restart|status}"
38        exit 1
39        ;;
40 esac
41 exit $RETVAL
This page took 0.032498 seconds and 4 git commands to generate.