summaryrefslogtreecommitdiffstats
path: root/apache/httpd
diff options
context:
space:
mode:
Diffstat (limited to 'apache/httpd')
-rwxr-xr-xapache/httpd44
1 files changed, 18 insertions, 26 deletions
diff --git a/apache/httpd b/apache/httpd
index 46ead71..65ccb6e 100755
--- a/apache/httpd
+++ b/apache/httpd
@@ -5,59 +5,51 @@ daemon_name=httpd
. /etc/rc.conf
. /etc/rc.d/functions
+APACHECTL=/usr/sbin/apachectl
case "$1" in
start)
stat_busy "Starting Apache Web Server"
- # RUN
- /usr/sbin/apachectl start &>/dev/null
- #
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
+ [ ! -d /var/run/httpd ] && install -d /var/run/httpd
+ if $APACHECTL start &>/dev/null ; then
add_daemon $daemon_name
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
stop)
stat_busy "Stopping Apache Web Server"
- # KILL
- /usr/sbin/apachectl stop &>/dev/null
- #
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
+ if $APACHECTL stop &>/dev/null ; then
rm_daemon $daemon_name
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
reload)
- apachectl -t || exit 1
stat_busy "Reloading Apache Web Server"
- /usr/sbin/apachectl graceful &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
+ if $APACHECTL graceful &>/dev/null ; then
add_daemon $daemon_name
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;
restart)
- apachectl -t || exit 1
stat_busy "Restarting Apache Web Server"
- /usr/sbin/apachectl restart &>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
+ if $APACHECTL restart &>/dev/null ; then
add_daemon $daemon_name
stat_done
+ else
+ stat_fail
+ exit 1
fi
;;