updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / backuppc / backuppc-httpd.rc
blobb8dee13aa1c14bc24d32c81355953d4c22997c29
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 case "$1" in
8 start)
9 stat_busy "Starting BackupPC HTTP Daemon"
10 /usr/sbin/apachectl -f /etc/httpd/conf/backuppc-httpd.conf -k start
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 add_daemon backuppc-httpd
15 stat_done
18 stop)
19 stat_busy "Stopping BackupPC HTTP Daemon"
20 /usr/sbin/apachectl -f /etc/httpd/conf/backuppc-httpd.conf -k stop
21 if [ $? -gt 0 ]; then
22 stat_fail
23 else
24 rm_daemon backuppc-httpd
25 stat_done
28 restart)
29 $0 stop
30 sleep 3
31 $0 start
33 reload)
34 if [ -f /var/run/backuppc-httpd.pid ]; then
35 status "Reloading BackupPC HTTP Configuration" kill -HUP `cat /var/run/backuppc-httpd.pid`
39 echo "usage: $0 {start|stop|restart|reload}"
40 esac