"mailscanner reload" for Solaris?

Randy Fishel randyf at SIBERNET.COM
Fri Aug 12 07:05:08 IST 2005


  Solaris, for several releases now, has had a "pkill" command, such
that:

     pkill -HUP MailScanner

will do the same thing without having to grep the process.  This is how
my S10 SMF refresh method restarts MailScanner (though it handles the
sendmail part by using the /var/run pid file).

rf
  
On Thu, 2005-08-11 at 21:16 +0100, Julian Field wrote:
> Jeff A. Earickson wrote:
> 
> > Julian,
> >
> > I was looking at Steve Swaney's Rules_Du_Jour install script,
> > and his script does "/etc/init.d/MailScanner reload", probably
> > in Linux-land.  My Solaris /etc/init.d script is attached, having
> > not been touched in a long time.  What would a "reload" action
> > be in Solaris?  Does MailScanner catch signals?
> 
> Yes.
> 
> Find the PID of MailScanner from the PID File setting in MailScanner.conf.
> If this PID is 123 then do
> 
> kill -HUP -123
> 
> Note the -123 as opposed to 123. This will HUP the whole process group, 
> which all the children will catch and commit suicide. They are then 
> respawned by the parent, which ignores the HUP itself.
> 
> 
> >#!/sbin/sh
> >#
> >
> >#---prevent core dumps
> >/usr/bin/ulimit -c 0
> >
> >case "$1" in
> >start)
> >	#---v4
> >	(/opt/MailScanner/bin/check_mailscanner > /dev/null) && echo "mailscanner started"
> >	status=$?
> >	;;
> >stop)
> >	kill `pgrep MailScanner` && echo "mailscanner stopped"
> >	status=$?
> >	;;
> >*)
> >	echo "Usage: $0 {start|stop}"
> >	exit 1
> >	;;
> >esac
> >
> >if [ $status != 0 ]; then
> >	echo "$status"
> >	exit 1
> >fi
> >exit 0
> >  
> >
> 

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list