logrotate, apache2, PidFile hardcoded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: apache2-common
Hello,
short: don't hardcode pidfile path in /etc/logrotate.
I'm using ubuntu 6.06 of a server. I put apache in a jail via mod_chroot and because of that I had to change the pidfile location. The pidfile is created in the jail, so you have to make a symlink to the pidfile at the original location to the jail pidfile. But in ubuntu /var/run is a TMPFS and the link would be erased an each restart. So I chose to place the pidfile in /var/run.apache2/ . Because of that logrotate which has a hardcoded location for the pidfile, does not restart apache on logrotate. The result is that apache still writes into the old, now renamed logfile and AWstats is loosing those entries.
Would it be possbile to do something similar to what is done in the init script. Something like:
AP_CONF=
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
fi
done
This get the pidfile location from the configuration
Changed in apache2: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
This has been fixed in 2.2.8-1