]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/mandrake/bacula-fd.in
Backport copyright changes
[bacula/bacula] / bacula / platforms / mandrake / bacula-fd.in
1 #! /bin/sh
2 #
3 # Copyright (C) Kern Sibbald 2000-2015
4 # License: BSD 2-Clause
5 #
6 # bacula       This shell script takes care of starting and stopping
7 #              the bacula File daemon.
8 #
9 # chkconfig: 2345 90 9
10 # description: The Leading Open Source Backup Solution.
11 #
12 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
13 #
14
15 # Source function library
16 . /etc/rc.d/init.d/functions
17
18 RETVAL=0
19 case "$1" in
20     start)
21        echo -n "Starting the Bacula File daemon: "
22        daemon @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
23        RETVAL=$?
24        echo
25        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
26        ;;
27     stop)
28        echo -n "Stopping the Bacula File daemon: "
29        killproc @sbindir@/bacula-fd
30        RETVAL=$?
31        echo
32        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
33        ;;
34     restart)
35        $0 stop
36        sleep 5
37        $0 start
38        RETVAL=$?
39        ;;
40     status)
41        status @sbindir@/bacula-fd
42        ;;
43     *)
44        echo "Usage: $0 {start|stop|restart|status}"
45        exit 1
46        ;;
47 esac
48 exit $RETVAL