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