]>
Commit | Line | Data |
---|---|---|
cdaeb249 AM |
1 | #! /bin/sh |
2 | # | |
3 | # bacula This shell script takes care of starting and stopping | |
4 | # the bacula File daemon. | |
5 | # | |
6 | # chkconfig: 2345 91 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 | case "$1" in | |
16 | start) | |
17 | echo -n "Starting the Bacula File daemon: " | |
18 | daemon @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf | |
19 | RETVAL=$? | |
20 | echo | |
21 | [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd | |
22 | ;; | |
23 | stop) | |
24 | echo -n "Stopping the Bacula File daemon: " | |
25 | killproc @sbindir@/bacula-fd | |
26 | RETVAL=$? | |
27 | echo | |
28 | [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd | |
29 | ;; | |
30 | restart) | |
31 | $0 stop | |
32 | sleep 5 | |
33 | $0 start | |
34 | ;; | |
35 | status) | |
36 | status @sbindir@/bacula-fd | |
37 | ;; | |
38 | *) | |
39 | echo "Usage: $0 {start|stop|restart|status}" | |
40 | exit 1 | |
41 | ;; | |
42 | esac | |
43 | exit 0 |