/etc/init.d/apache2 routinely prints to stderr if few modules are enabled, causing logrotate to spam in cron
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: apache2-common
We have a server which basically runs a vanilla apache, with very few modules enabled. Every night, logrotate sends us this cron mail:
Subject: Cron <root@hostname> test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
/etc/
grep: /etc/apache2/
This is caused by /etc/init.d/apache2 skimming through the config file to find the PidFile setting, like this:
for i in $AP_CONF `awk '$1 ~ /^\s*[Ii]nclude$/ && $2 ~ /^\// {print $2}' $AP_CONF`; do
if [ -e "$PIDFILE" ]; then
fi
done
The problem is when these globs in /etc/apache2/
Include /etc/apache2/
Include /etc/apache2/
I have attached a patch which redirects stderr from grep to /dev/null. This should solve the problem without any negative side-effects as far as I can tell.
Oh, and if anyone with the same problem reads this before it is patched: A work-around for this problem is to create an empty file (or two) in /etc/apache2/
Hi,
For whatich apache version is this patch for?
Thanks
chuck