MailScanner ANNOUNCE: Stable release 4.63.7

Julian Field MailScanner at ecs.soton.ac.uk
Sun Sep 2 14:19:38 IST 2007



James Gray wrote:
> On 02/09/2007, at 1:11 AM, Julian Field wrote:
>
>> I have just released the latest stable version 4.63.7.
>
> Super! I downloaded the latest beta 24 hours ago...looks like another 
> download for me :)
>
>> The full Change Log is this:
>>
>> * New Features and Improvements *
>> 1 Improved init.d script, so that 'service MailScanner restart' or
>>  '/etc/init.d/MailScanner restart' runs faster. It pauses for just long
>>  enough for the old MailScanner to die gracefully, and starts up the 
>> new one
>>  as soon as the old one has died. Previously, it just waited for a fixed
>>  length of time which was much longer than needed for most people.
>
> I wrote an init script a while ago for slow machines that loops 
> waiting for MailScanner children and parent to terminate with a 
> configurable delay loop.  If you're interested:
> http://files.gray.net.au/MailScanner/mailscanner-slow.sh
>
> I just had a look at it and it isn't the best shell script I've ever 
> written, but in my defence, I wrote it years ago when I was relatively 
> inexperienced at it.  Still, the logic in it is sound, although there 
> is no check for infinite loops in the delay loop.  It wouldn't be hard 
> to implement a counter though and after 'n' delay loops, do something 
> other than keep waiting (bail with an error, attempt the SIGKILL the 
> remaining PID's, whatever).
>
> Just thought this may be useful rather than an arbitrary delay period, 
> to actually check to see if there are any MailScanner PID's still around.
But that's exactly what my improvement to my init.d script does. It 
doesn't wait for an arbitrary delay period, that's the point of my 
improvement. Please take a look at my script, the "stop" code does this:

        $0 stop
        echo -n 'Waiting for MailScanner to die gracefully '
        while ( ps ax | grep -q '[M]ailScanner:' )
        do
          echo -n .
          sleep 1
        done
        echo ' dead.'
        sleep 1
        $0 start

Jules

-- 
Julian Field MEng CITP
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
For all your IT requirements visit www.transtec.co.uk


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk



More information about the MailScanner mailing list