summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Jones <carpaski@gentoo.org>2002-09-18 13:21:24 +0000
committerNicholas Jones <carpaski@gentoo.org>2002-09-18 13:21:24 +0000
commit0bb281776a2abf431c408888f94a11931474a221 (patch)
tree5ee814c1f8bf1cd240ac1df69f36300f42d984fe /net-www/apache
parentunmasked pyqt (diff)
downloadgentoo-2-0bb281776a2abf431c408888f94a11931474a221.tar.gz
gentoo-2-0bb281776a2abf431c408888f94a11931474a221.tar.bz2
gentoo-2-0bb281776a2abf431c408888f94a11931474a221.zip
Fixed the restart issue. Bug 7995 --- Touched up -r4
Diffstat (limited to 'net-www/apache')
-rw-r--r--net-www/apache/ChangeLog4
-rw-r--r--net-www/apache/apache-1.3.26-r4.ebuild12
-rw-r--r--net-www/apache/files/apache.rc616
3 files changed, 22 insertions, 10 deletions
diff --git a/net-www/apache/ChangeLog b/net-www/apache/ChangeLog
index d215a8bc7c36..867b9fa9f980 100644
--- a/net-www/apache/ChangeLog
+++ b/net-www/apache/ChangeLog
@@ -1,3 +1,4 @@
+B
# ChangeLog for net-www/apache
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
@@ -18,6 +19,9 @@
*apache-1.3.26-r4 (3 Jul 2002)
+ 17 Sep 2002; Nicholas Jones <carpaski@gentoo.org> :
+ Fixed the graceful restart... It wasn't paying heed to ${APACHE_OPTS}
+
14 Sep 2002; Nicholas Jones <carpaski@gentoo.org> :
Added the capability for a graceful restart. Should ensure that
the server, when restarted, actually dies before it's started again.
diff --git a/net-www/apache/apache-1.3.26-r4.ebuild b/net-www/apache/apache-1.3.26-r4.ebuild
index af7efdb8f84d..bd92d43cd766 100644
--- a/net-www/apache/apache-1.3.26-r4.ebuild
+++ b/net-www/apache/apache-1.3.26-r4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-www/apache/apache-1.3.26-r4.ebuild,v 1.4 2002/08/16 03:01:01 murphy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/apache/apache-1.3.26-r4.ebuild,v 1.5 2002/09/18 13:21:24 carpaski Exp $
mod_ssl_ver=2.8.9-${PV}
HARD_SERVER_LIMIT=512
@@ -75,15 +75,15 @@ src_compile() {
DATA_DIR=`grep apache /etc/passwd | cut -d: -f6`
if [ -z "$DATA_DIR" ]; then
- eerror "DATA_DIR is null! Using defaults."
- eerror "You probably want to check /etc/passwd"
DATA_DIR="/home/httpd"
+ eerror "DATA_DIR is null! Using default."
+ eerror "Create the apache user and set the homedir to your desired location."
fi
- einfo "Using $DATA_DIR as the default data directory."
-
+ einfo "Using $DATA_DIR as apache's default data directory."
+
select_modules_config || \
- die "couldn't find apache-builtin-mods config file"
+ die "couldn't find apache-builtin-mods config file"
#-DBUFFERED_LOGS
OPTIM="${mycflags} -DHARD_SERVER_LIMIT=${HARD_SERVER_LIMIT} \
diff --git a/net-www/apache/files/apache.rc6 b/net-www/apache/files/apache.rc6
index 3798b0504820..356c535b8a74 100644
--- a/net-www/apache/files/apache.rc6
+++ b/net-www/apache/files/apache.rc6
@@ -10,21 +10,29 @@ depend() {
start() {
ebegin "Starting apache"
- start-stop-daemon --quiet --start --startas /usr/sbin/apache \
+ start-stop-daemon -o --quiet --start --startas /usr/sbin/apache \
--pidfile /var/run/apache.pid -- ${APACHE_OPTS}
eend $?
}
stop() {
ebegin "Stopping apache"
- /usr/sbin/apachectl stop
+ /usr/sbin/apachectl stop &>/dev/null
start-stop-daemon -o --quiet --stop --pidfile /var/run/apache.pid
eend $?
}
svc_restart() {
ebegin "Gracefully restarting apache"
- /usr/sbin/apachectl graceful
- eend $?
+ /usr/sbin/apache -t ${APACHE_OPTS} &>/dev/null
+
+ if [ "$?" != "0" ]; then
+ svc_stop
+ eend 1 "Apache configuration error"
+ else
+ killall -USR1 httpd &> /dev/null
+ svc_start &>/dev/null
+ eend $?
+ fi
}