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

Re: DebConf-ing Apache Modules



On Thu, Aug 02, 2001 at 11:22:54PM +0800, James Bromberger wrote:
> However the option of restarting Apache after a module is upgraded 
> could perhaps be made common amongst all module packages being upgraded or 
> installed in one session. Would this be a shared template in DebConf? My 
> opionion here is we want to mini5imise the 'downtime' for the web site 
> we are running, and performing N restarts because we have a new apache, 
> new libapache-mod-ssl, new libapach-mod-perl, etc, seems a bit bothersome 
> (but perhaps unavoidable?).
> 
> Furthermore, how can we ensure that this shared question is actually asked 
> every time, and not just the initial result saved and reused on every 
> subsequent `apt-get upgrade`?  By every time, I mean once every time one 
> or more modules is upgraded, and no more than once? 
> 
> Anyway, a shove in the right direction on this topic would be much 
> appreciated.

I had a similar idea just a few days ago (Zope shares this kind of
problem with Apache). I'm not familiar with debconf, so I had to play
little bit, and finally came up with a configuration where a few
packages share a 'temporary' debconf select variable.

The preinst's of all packages added their name to the choices of the
shared select variable, and the postinst's removed this packages's name.

Each postinst would look if it's the last package in the choices list.
If it was, that would mean that it's the last Zope/Apache module package
that's installed in that apt run. Then, this package should care to
restart the Zope/Apache server.

Similarly with prerm/postrm.

It seemed to work, but I'd like to have somebody with more debconf
experience look into the scripts. If somebody's interested, I'll post
them here.

    Gregor



Reply to: