NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Restart services after upgrade
On Sat, Dec 11, 2010 at 08:23:02PM +0100, Manuel Bouyer wrote:
> Sure. And I also certainly want to stop sendmail while I upgrade
> spamassassin, clamav or procmail, although there's no dependancies
> between these packages.
There is a better solution to that particular problem. I use the
following script called "/usr/local/bin/procmail" in ".forward" files:
#!/bin/sh
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/pkg/bin:/sbin
PROCMAIL=/usr/pkg/bin/procmail
SPAMASS=/usr/pkg/bin/spamassassin
if [ ! -x $PROCMAIL ] || [ ! -x $SPAMASS ]
then
exit 75
fi
if [ $(sysctl -n vm.loadavg | awk '{ print $2*100.0; }') -gt 800 ]
then
exit 75
fi
exec $PROCMAIL "$@"
exit 75
It keeps e-mails in the queue if the load is too high or the real
"procmail" or "spamassassin" are missing.
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
Home |
Main Index |
Thread Index |
Old Index