1#! /bin/sh
2#
3# Copyright (C) 2000-2015 Kern Sibbald
4# License: BSD 2-Clause; see file LICENSE-FOSS
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
15RETVAL=0
16case "$1" in
17    start)
18       echo "Starting the Bacula File daemon: "
19       @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
20       RETVAL=$?
21       echo
22       [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
23       ;;
24    stop)
25       echo "Stopping the Bacula File daemon: "
26#	killproc @sbindir@/bacula-fd
27       RETVAL=$?
28       echo
29       [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
30       ;;
31    restart)
32       $0 stop
33       sleep 5
34       $0 start
35       RETVAL=$?
36       ;;
37    *)
38       echo "Usage: $0 {start|stop|restart}"
39       exit 1
40       ;;
41esac
42exit $RETVAL
43