> The guy who made the script did simply test shutting and restarting the
> amavis/spamd daemon up and down in its own test environment, which basicly
> is low mail load or even no mail at all.
>
> After a while amavis is doing it's dirty job, I noticed it needs a lot of
> time to shut down. It takes to me something around 10 secs in the average
> and sometimes it takes even more. So, a 'sleep 5' simply wouldn't fit.

To shut down amavisd, use the command: amavisd stop
To restart amavisd, use the command:   amavisd reload

These commands will only exit after they have completed their job,
i.e. waiting for the existing daemon to have stopped.

Fiddling directly with pid file, kill, sleep, etc., is unwise,
and most likely much less careful compared to how amavisd does it.

  Mark

Reply via email to