Suggested change to script

Julian Field MailScanner at
Tue Sep 8 09:24:46 IST 2009

I basically like it. You've got 2 small problems
1) The "if [ reload ==1 ]; then" line should of course read "if [ 
"$reload" = "1" ]; then"
(i.e. you mean "=" for comparing strings (though == does appear to work, 
it's not documented in test(1)), and you missed the "$" off the front of 
$reload which is rather more critical! :-)
2) What happens if the downloaded file is bad and you haven't already 
got a backup of it?
I have solved that one by deleting the downloaded file in that case.

But otherwise, your code looks good.
I have attached my new copy of the script. Please let me know what you 

On 07/09/2009 20:31, Mark Sapiro wrote:
> I note the script at has
> been recently changed. The prior script contained
> /usr/bin/wget -N -O
> With my version of wget at least, the -N option was inneffective in
> preventing unnecessary retrieval of unchanged data because of the
> (unnecessary) -O option.
> This has apparently been recognized as the script was changed to do
> /usr/bin/wget -O
> instead, but it also always downloads the file and reloads MailScanner.
> I have changed the script somewhat differently, and with my changes,
> wget does not retrieve the file if it is unchanged, and only reloads
> MailScanner if it does change the file.
> Attached is a patch KAM_cf_sh.patch to convert the current
> script, and KAM_cf_sh
> is the converted script.


Julian Field MEng CITP CEng
Buy the MailScanner book at

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at and

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 896 bytes
Desc: not available
Url :

More information about the MailScanner mailing list