[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Registration with a webserver - how to restart



Hi, 

I've recently adopted the phpwiki package which had fallen into a state
of bitrot unfortunately. I'm attempting to restore it to a working level
and hopeful get the packaging in line with the nascent webapps and
database policies. 

I have a question regarding the registration of an application with
webservers (particuarly apache). The webapps policy in chapter 5.1.2
specifies how and where the configuration snippet should be placed, but
doesn't deal with whether the package should attempt to reload the
webserver configuration. 

I think the answer is yes it should, otherwise after apt-get install
phpwiki nothing will work!

For example the phpwiki package currently supports integration with
apache, apache-ssl, apache-perl and in the next release apache2. Where
integration means symlinking the configuration into the appropriate
conf.d directory. Currently the package then runs invoke-rc.d
<webserver> restart (or if invoke-rc.d isn't
present /etc/init.d/<webserver> restart) to attempt to make the new
configuration active. As described below this is problematic:

- Shouldn't the package call force-reload rather than restart?

- When a package supports multiple webservers and more than one is
installed, should it attempt to configure itself with all of them?

- When configuring itself with a webserver should a failure to reload
the configuration files cause an error in the postinst/postrm script? OR
Should it only cause a failure only if none of the supported webservers
was successfully reconfigured? 

Neither of these approaches seem perfect when you consider that a
webserver might fail to reload its configuration successfully because it
is removed but not purged (see bug #259098). 

- What about if apache and apache2 are installed and configured, but the
adminstrator has disabled apache. Surely the package shouldn't try to
install / configure itself with apache in this scenario. 

Is there a best practice in these areas?

Look forward to your response. 

Regards


-- 
Matt Brown
matt@mattb.net.nz
Mob +64 275 611 544 www.mattb.net.nz



Reply to: