From 2e05b0f65a05ac902532b2b324e9d437054b644a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 1 Mar 2010 16:33:59 +0100 Subject: update Signed-off-by: Florian Pritz --- apache/httpd | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'apache/httpd') 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 ;; -- cgit v1.2.3-24-g4f1b From 1dffac4f0cca7bc2f6bdc044e2805edff5be1c87 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 17 Mar 2010 15:36:43 +0100 Subject: remove apache Signed-off-by: Florian Pritz --- apache/httpd | 65 ------------------------------------------------------------ 1 file changed, 65 deletions(-) delete mode 100755 apache/httpd (limited to 'apache/httpd') diff --git a/apache/httpd b/apache/httpd deleted file mode 100755 index 65ccb6e..0000000 --- a/apache/httpd +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -daemon_name=httpd - -. /etc/rc.conf -. /etc/rc.d/functions - -APACHECTL=/usr/sbin/apachectl - -case "$1" in - start) - stat_busy "Starting Apache Web Server" - [ ! -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" - if $APACHECTL stop &>/dev/null ; then - rm_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - reload) - stat_busy "Reloading Apache Web Server" - if $APACHECTL graceful &>/dev/null ; then - add_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - restart) - stat_busy "Restarting Apache Web Server" - if $APACHECTL restart &>/dev/null ; then - add_daemon $daemon_name - stat_done - else - stat_fail - exit 1 - fi - ;; - - status) - stat_busy "Checking Apache Web Server status"; - ck_status $daemon_name - ;; - - *) - echo "usage: $0 {start|stop|reload|restart|status}" -esac - -exit 0 -- cgit v1.2.3-24-g4f1b