RH init script
Julian Field
MailScanner at ecs.soton.ac.uk
Sat Feb 28 13:12:50 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Why not just kill the mspid, and not killproc MailScanner?
On 27/2/09 20:05, Denis Beauchemin wrote:
> 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
>
Jules
- --
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.9.1 (Build 287)
Comment: Use PGP or Thunderbird Enigmail to verify this message
Charset: ISO-8859-1
wj8DBQFJqThbEfZZRxQVtlQRAgCHAJ4nGGLGV8SmZ0Q3JZTtq3JODFPExwCfdmhe
byB4cT6yYCmNUaDlQxRaz4M=
=68RP
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list