RH init script
Denis Beauchemin
Denis.Beauchemin at USherbrooke.ca
Fri Feb 27 20:05:10 GMT 2009
Julian Field a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> On 27/2/09 15:05, Denis Beauchemin wrote:
>
>> PS: I am trying to configure a server that could (in case of DR) play
>> both inbound and outbound roles at the same time. I will be running
>> different sendmail and MS instances. I think the current init script
>> won't play nice with this scheme because it "killproc MailScanner"
>> without regards about which instance it might belong to. Why don't you
>> use $MSPID instead?
>>
> Err... because I started by copying someone else's init.d script! I
> ideally want to send the TERM to the child processes as well, though, so
> they all get told to start dying.
>
> Jules
>
Julian,
In the RH init script, could you replace all "killproc MailScanner -15" by:
if [[ -s $MSPID ]]; then
kill -15 $(ps -ef|grep $(cat /var/run/MailScanner.pid)|awk
'/MailScanner:/{print $2}')
else
killproc MailScanner -15
fi
That way you'll kill all MS children at the same time without killing
other MS processess started by a different instance of MS.
There are so many things I have to modify in so many different files to
be able to run many MS instances simultaneously on the same machine that
I may as well rewrite the init.d script altogether...
Thanks!
Denis
--
_
°v° Denis Beauchemin, analyste
/(_)\ Université de Sherbrooke, S.T.I.
^ ^ T: 819.821.8000x62252 F: 819.821.8045
More information about the MailScanner
mailing list