summaryrefslogtreecommitdiffstats
path: root/apache/httpd
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-03-01 16:33:59 +0100
committerFlorian Pritz <bluewind@xssn.at>2010-03-01 20:41:28 +0100
commit2e05b0f65a05ac902532b2b324e9d437054b644a (patch)
treed55f0caf1ec4578b87d27dcd593550f8460821ae /apache/httpd
parentf23d273a395cbdfd8a1197adc3509ba3dfb4637b (diff)
downloadaur-packages-2e05b0f65a05ac902532b2b324e9d437054b644a.tar.gz
aur-packages-2e05b0f65a05ac902532b2b324e9d437054b644a.tar.xz
update
Signed-off-by: Florian Pritz <bluewind@xssn.at>
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
;;