updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / bacula / bacula-dir.rc.d
bloba5a103dca368f5b94eab8b270cd806f7f48f5f25
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 Director Daemon"
13 /usr/sbin/bacula-dir
14 if [ $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon bacula-dir
18 stat_done
21 stop)
22 stat_busy "Stopping Bacula Director Daemon"
23 killall bacula-dir > /dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon bacula-dir
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