On Wed, Mar 08, 2006 at 10:25:11PM +0100, Ola Lundqvist wrote: > Hi Hi.
> > - don't reload if the daemon is down > > Do it start instead then? No, reload should just reload the daemon. If it's down it should do nothing (i.e. it does not make sense to 'reload' a daemon which is not active. > > - I've also changed the 'ps' checks with multiple pipes to use pidof, this > > is > > typically faster, although with the caveat that no some very fast systems > > this might leat to a race condition (pidof returns while the process is > > still > > stopping and killing children) so a double check (waiting a second) is done > > just in case. > > Is that faster then? Should be for most systems, for fast systems it might be slightly slower (1 second slower). Pidof is faster than 'ps -ef |grep | ....'. However the race condition whould eventually appear (even if using ps -ef) in *very* fast systems since the death of ntop's children is done on the "background" > I'll also incorporate the changes to upstream as I realize that this init > script > is general enough for other distributions as well. I believe ntop already provides one for RedHat (in packages/RedHat/ntop.init) and Mandrake. Regards Javier
signature.asc
Description: Digital signature