Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191422 - New Apache init.d script hardcodes pidfile; creates problems
Summary: New Apache init.d script hardcodes pidfile; creates problems
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-05 19:18 UTC by Tim Strong
Modified: 2007-09-07 14:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Strong 2007-09-05 19:18:45 UTC
The new apache init.d script (as of version 2.0.59-r5) hardcodes the pidfile in the start, stop, and reload functions.  For the default setup, this does not cause a problem, but it does for more complicated configurations.

In our case, we have multiple instances of apache running on different ports to serve different purposes.  '/etc/init.d/apache2_admin' and '/etc/init.d/apache2_virtualhost' are both symlinks to '/etc/init.d/apache2'.  They each have their own files in '/etc/conf.d' where their individual pidfiles are specified using the variable PIDFILE.  Unfortunately, the new init.d script for apache2 hardcodes '/var/run/apache2.pid', so it can't (and shouldn't) find it when trying to restart apache2_virtualhost or apache2_admin.

Shouldn't the init.d script check to see if PIDFILE is set first in the /etc/conf.d file?  If it isn't, it can set a reasonable default (/var/run/apache2.pid).  The start, stop, and reload functions should then use '--pidfile ${PIDFILE}'.  Does this seem reasonable?

Reproducible: Always

Steps to Reproduce:
1./etc/init.d/apache2_admin start
2./etc/init.d/apache2_admin restart
3.

Actual Results:  
Can't find /var/run/apache2.pid

Expected Results:  
Script finds /var/run/apache2_admin.pid and restarts the application.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-05 19:21:55 UTC
Sorry, we are not going to break the initscript once again. If you need customized setup, customize the initscript as well. It works for supported use cases just fine. Running multiple apache instances is not supported.