On Monday 24 Apr 2006 22:35, Steve Basford wrote:
> Christopher X. Candreva wrote:
> > I've atached my updated Perl script. It will now check the compressed
> > archive, and if it is updated download and upcompress it.
>
> Thank you!
>
> I'll sort out the website tomorrow hopefully, with some of sample
> "recommended" scripts.
>
> Cheers,
>
> Steve

I've been 'messing around' some.
I note that the file inside the .gz is called phishc.ndb
If I unpack it with
gunzip -N phish.ndb.gz
I get phishc.ndb with its timestamp intact, which is what I want, so that the 
various servers fetching from my copy can make decisions about wether or not 
to fetch it.

Steve, is it your intention to name the file inside the .gz phishc.ndb, 
consistently, so I can script on that basis?

using the --stdout method results in a new timestamp. For me that is 
confounding.

using -N saves the original, if I run

# copy the original to .old
cp -fp phish.ndb phish.ndb.old

# put the .gz in a tmp file for restoration later
cp -p phish.ndb.gz phish.ndb.gz.tmp

# unzip, preserving timestamp of the file inside
gunzip -N phish.ndb.gz

# move the new file into place
mv -f phishc.ndb phish.ndb

# restore the .gz so that it's presence can be detected next time
mv phish.ndb.gz.tmp phish.ndb.gz

(surrounding the above with checks for existence etc)
then I should be in the same position I was before this .gz idea and I won't 
have to go and change a number of other scripts. ;-)

There must be quite a few people who have multiple servers to stock, this way 
they only fetch it once and can propagate by whichever means they like, while 
minimising the load/bandwidth on sanesecurity.

This works with Chris Candreva's perl script Phish.pl and should work with any 
other method, it's the timestamp preservation that is crucial.

HTH

-- 
-----------------
Bob Hutchinson
Midwales dot com
-----------------
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to