]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/alpha/bacula-fd.in
Add alpha
[bacula/bacula] / bacula / platforms / alpha / 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 20 99
7 # description: It comes by night and sucks the vital essence from your
8 computers.
9 #
10 #  for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ 
11 #
12
13 case "$1" in
14     start)
15        echo "Starting the Bacula File daemon: "
16        /sbin/bacula-fd $2 -c /etc/bacula/bacula-fd.conf
17        RETVAL=$?
18        echo
19 ##       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
20        ;;
21     stop)
22        echo "Stopping the Bacula File daemon: "
23 #       killproc @sbindir@/bacula-fd
24        ID=`ps -ef | grep -F bacula-fd | grep -Fv grep | awk '{print $2}'`
25        [ -n "$ID" ] && kill $ID
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     *)
36        echo "Usage: $0 {start|stop|restart}"
37        exit 1
38        ;;
39 esac
40 exit 0