updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bacula / bacula-fd.rc.d
blob3817a0fed361c6767fe64160603c2e9ab7d684ac
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
9 [ -d /var/run/bacula ] || mkdir -p /var/run/bacula
10 chown bacula:bacula /var/run/bacula
12 stat_busy "Starting Bacula File Daemon"
13 /usr/sbin/bacula-fd
14 if [ $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon bacula-fd
18 stat_done
21 stop)
22 stat_busy "Stopping Bacula File Daemon"
23 killall bacula-fd > /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon bacula-fd
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0