updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / apache-gost / httpd
blob6fa9c3cc76724f7c95fe8c09fdbccd6fa1a1eadf
1 #!/bin/bash
3 daemon_name=httpd
5 . /etc/rc.conf
6 . /etc/rc.d/functions
8 APACHECTL=/usr/sbin/apachectl
10 case "$1" in
11 start)
12 stat_busy "Starting Apache Web Server"
13 [ ! -d /var/run/httpd ] && install -d /var/run/httpd
14 if $APACHECTL start >/dev/null ; then
15 add_daemon $daemon_name
16 stat_done
17 else
18 stat_fail
19 exit 1
23 stop)
24 stat_busy "Stopping Apache Web Server"
25 if $APACHECTL stop >/dev/null ; then
26 rm_daemon $daemon_name
27 stat_done
28 else
29 stat_fail
30 exit 1
34 reload)
35 stat_busy "Reloading Apache Web Server"
36 if $APACHECTL graceful >/dev/null ; then
37 add_daemon $daemon_name
38 stat_done
39 else
40 stat_fail
41 exit 1
45 restart)
46 stat_busy "Restarting Apache Web Server"
47 if $APACHECTL restart >/dev/null ; then
48 add_daemon $daemon_name
49 stat_done
50 else
51 stat_fail
52 exit 1
56 status)
57 stat_busy "Checking Apache Web Server status";
58 ck_status $daemon_name
62 echo "usage: $0 {start|stop|reload|restart|status}"
63 esac
65 exit 0