]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/irix/bacula-fd.in
671eb4b0c2211a596f538808d17219f4ce5d1ebe
[bacula/bacula] / bacula / platforms / irix / bacula-fd.in
1 #! /bin/sh
2 #
3 # bacula       This shell script takes care of starting and stopping
4 #              the bacula File daemon.
5 #
6 # chkconfig: 2345 90 9
7 # description: The Leading Open Source Backup Solution.
8 #
9 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
10 #
11
12 case "$1" in
13     'start')
14        echo "Starting the Bacula File daemon: "
15        if test -x @sbindir@/bacula-fd && test -f @sysconfidir@/bacula-fd.conf; then
16          exec  @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
17        fi
18        RETVAL=$?
19        echo
20        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
21        ;;
22     'stop')
23        echo "Stopping the Bacula File daemon: "
24        /sbin/killall -k 10 -TERM @sbindir@/bacula-fd
25        RETVAL=$?
26        echo
27        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
28        ;;
29     'restart')
30        $0 stop
31        sleep 5
32        $0 start
33        ;;
34     *)
35        echo "Usage: $0 {start|stop|restart}"
36        exit 1
37        ;;
38 esac
39 exit 0