On Monday 24 Apr 2006 07:04, Steve Basford wrote:
> Hi All,
>
> In order to optimize the use of my bandwidth for the unofficial phishing
> signatures, I want to put up a few
> example scripts on the main page of my site that users should use to
> download the phish.ndb file.
>
> The reason is that I've got quite a few users, downloading every 15
> mins, the same phish.ndb file, whether the
> contents of the phish.ndb file has changed or not :(
>
> I've just moved server onto a higher bandwidth package but it's not
> unlimited :)
>
> Could anyone come up with some good wget/curl scripts, with wget, I
> guess it's using the -N option to only download changes and only
> download hourly (eg.  15:00, 16:00, 17:15, 18:15) etc.
>
> Sorry to be slightly off-topic here...

Here's another example:

cd /home/user/html/downloads/clamav
wget -N -q http://www.sanesecurity.com/clamav/phish.ndb
RET=$?
if [ $RET -ne "0" ]; then
        echo "wget phish.db failed"
else
        touch /home/user/phishdb.done
fi

I put that on a (twice daily) cron and point other users/servers to the url 
associated with /home/user/html/downloads/clamav

Takes a load off sanesecurity.com ;-)

If it fails I get an email from cron and I've got a timestamped file telling 
me when it last ran successfully.


>
> Cheers,
>
> Steve
>
>
>
> _______________________________________________
> http://lurker.clamav.net/list/clamav-users.html

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

Reply via email to