RC scripts - restart not working

Julian Field mailscanner at ecs.soton.ac.uk
Fri Aug 29 09:14:36 IST 2003


At 03:52 29/08/2003, you wrote:
>On Thu, 2003-08-28 at 21:24, David Hooton wrote:
> > Hi All,
> >
> > Due to some systems software we have installed, we need to restart
> > MailScanner every 15 minutes - this is not a problem, we don't mind the
> > restart bit, that's ok.
> >
> > The problem we have is that the rc scripts don't always actually restart
> > MailScanner.  We're running /etc/init.d/MailScanner restart but that
> > seems to not work properly because MailScanner has to wait for all
> > processes to stop.
> >
> > Our (not so great) work around is to script a service stop, wait 10
> > seconds and then start MS as per normal.  Surely there's a better way..
> >
> > I am kinda erring on pointing the bone and saying the rc scripts are
> > broken, but I'm not that kinda guy! :)
> >
>
>well, on my machine /etc/init.d/MailScanner simply waits 5 between the
>stop and start.  It does seem kind of a bummer that it is not really
>stopped when the stop call returns.  what is still happening at that
>point?  Obviously there is something going on since the wait 5 is there.

The "stop" returns after it has issued the "kill" commands to all the
MailScanner processes. There is no easy means of synchronising it all so
that it only returns once all the MailScanner processes have actually died.
The reason for the delay between the kill and the process termination is
that MailScanner catches the "kill" and starts a clean tidyup of your
filesystem, so you don't get loads of rubbish left behind in
/var/spool/MailScanner/incoming but all that is deleted for you. It takes
several seconds for this to complete, after which the MailScanner processes
terminate.

Just wait 5 or 10 seconds between the stop and the start.
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list