Hi,
I've noticed that /etc/init.d/apache2, gives an error when trying to
grep the pid file, when an include expression (dir/*.conf) would include
nothing.
Server version: Apache/2.0.55
Server built: Sep 27 2006 16:52:14
The attached patch solves this, though I don't know if this is the best way.
Please excuse me if this is already solved in a newer version.
Best regards,
Arnold
--- apache2.org 2007-02-13 16:21:35.000000000 +0100
+++ apache2 2007-02-16 01:02:31.000000000 +0100
@@ -37,9 +37,11 @@
# here, but only first-level includes are supported, not nested ones
for i in $AP_CONF `awk '$1 ~ /^\s*[Ii]nclude$/ && $2 ~ /^\// {print $2}' $AP_CONF`; do
- PIDFILE=`grep -i ^PidFile $i | tail -n 1 | awk '{print $2}'`
- if [ -e "$PIDFILE" ]; then
- PID=`cat $PIDFILE`
+ if [ -e $i ] ; then
+ PIDFILE=`grep -i ^PidFile $i | tail -n 1 | awk '{print $2}'`
+ if [ -e "$PIDFILE" ]; then
+ PID=`cat $PIDFILE`
+ fi
fi
done