4
# Required-Start: $remote_fs $syslog
5
# Required-Stop: $remote_fs $syslog
6
# Should-Start: bacula-sd
7
# Should-Stop: bacula-sd
8
# Default-Start: 2 3 4 5
10
# Short-Description: Start Bacula File Daemon at boot time
11
# Description: bacula-fd installes on machine to be backuped up. It is
12
# responsible for providing the file attributes and data
13
# when requested by the Director. It is also responsible
14
# for the file system dependent part of restoring the file
15
# attributes and data during a recovery operation.
18
# bacula-fd SysV init script for Bacula-FD.
20
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
21
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
22
# Customized for Bacula by Jose Luis Tallon <jltallon@adv-solutions.net>
27
PATH=/sbin:/bin:/usr/sbin:/usr/bin
28
DAEMON=/usr/sbin/bacula-fd
31
DESC="Bacula File daemon"
33
test -x $DAEMON || exit 0
35
if [ -n "`getent services bacula-fd`" ]; then
36
PORT=`getent services bacula-fd | awk '{ gsub("/tcp","",$2); print $2; }'`
39
. /lib/lsb/init-functions
40
. /usr/share/bacula-common/common-functions.init
41
if [ -r /etc/default/$NAME ]; then
45
CONFIG="${CONFIG:-/etc/bacula/$NAME.conf}"
50
PIDFILE=/var/run/bacula/$NAME.$PORT.pid
54
start-stop-daemon --start --quiet --pidfile $PIDFILE \
55
--oknodo --exec $DAEMON -- -c $CONFIG $ARGS
60
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
61
--retry TERM/30/KILL/5 --exec $DAEMON -- -c $CONFIG $ARGS
66
if [ "$ENABLED" = "no" ]; then
67
log_failure_msg "Not starting $DESC: disabled via /etc/default/$NAME"
71
log_daemon_msg "Starting $DESC..." "$NAME"
79
log_daemon_msg "Stopping $DESC..." "$NAME"
93
status_of_proc -p $PIDFILE $DAEMON $NAME
97
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2