On Mon, 11 Jul 2011, James Ralston wrote:

> We are in a situation where we have multiple hosts that need to run
> ClamAV, but those hosts are highly restricted in what outbound
> Internet access they have.  Thus, we need to run a local ClamAV
> mirror.

I have one machine run freshclam, and use rsync to update all my other 
servers with the databases.  

The clamav user has to have ssl keys set up so 
it can ssh to the other servers without a password. 
Then, freshclam.conf has this:
OnUpdateExecute /usr/local/sbin/ClamPush.sh

ClamPush.sh is:
#!/usr/bin/bash

CLAMDIR=/usr/local/share/clamav
RSYNC=/usr/local/bin/rsync

cd $CLAMDIR

for HOST in 'server1' 'server2' 'server3' 
do
        echo "Updating $HOST:\n"
        $RSYNC -avzr --delete . $HOST:$CLAMDIR
        echo "Done with $HOST\n\n"
done



==========================================================
Chris Candreva  -- ch...@westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to