Koozali.org: home of the SME Server

Clam Mirrors

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Clam Mirrors
« on: September 25, 2008, 08:06:51 PM »
Hey there

Is there a way to add a custom mirror to ClamAV so that it can update from a local site instead?

Thanks!

G

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Re: Clam Mirrors [SOLVED]
« Reply #1 on: September 25, 2008, 09:47:16 PM »
Ah, /etc/freshclam.conf

But you'll need to create a custom template to make the changes.

Code: [Select]
cd /etc/e-smith/templates-custom/etc/
mkdir freshclam.conf
cd freshclam.conf
vi DatabaseMirror

Add:

Code: [Select]
DatabaseMirror your.closest.server.tld
DatabaseMirror db.local.clamav.net
DatabaseMirror database.clamav.net
ESC
:wq!

Reason you add the second and third entries is becasue they overwrite the originals. So for a failsafe, leave them in.

To finish up:
Code: [Select]
expand-templates /etc/freshclam.conf

To check if the entries are in:
Code: [Select]
cat /etc/freshclam.conf

Lastly
Code: [Select]
sv restart /service/freshclam
« Last Edit: September 25, 2008, 10:57:29 PM by GlitchFreak »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Clam Mirrors [SOLVED]
« Reply #2 on: September 25, 2008, 10:15:36 PM »
Lastly
Code: [Select]
freshclam

No. There is a continuously running freshclam. To restart it (actually, so terminate it, so that a new copy is started in its place, do:

sv t /service/freshclam

or

sv restart /service/freshclam

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Re: Clam Mirrors
« Reply #3 on: September 25, 2008, 10:56:55 PM »
Thanks Charlie.

I forgot that there is a daemon running and I need to terminate it in order to load up the new config