]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/clamav/manifests/init.pp
some more clamav stuff
[dsa-puppet.git] / modules / clamav / manifests / init.pp
index d8c35a3bae83b43c9cbdc224aff3302cecef8af3..ef745a6ce98b3017a77da9aeb11328ca9dca6750 100644 (file)
@@ -1,30 +1,47 @@
 class clamav {
-    package { "clamav-daemon": ensure => latest;
-              "clamav-freshclam": ensure => latest;
-    }
+       package { [
+                       'clamav-daemon',
+                       'clamav-freshclam',
+                       'clamav-unofficial-sigs'
+               ]:
+                       ensure => installed
+       }
 
-    file {
-        "/etc/clamav/clamd.conf":
-          source  => "puppet:///clamav/clamd.conf",
-          require => Package["clamav-daemon"],
-          notify  => Exec["clamav-daemon restart"]
-          ;
-    }
+       $extra_groups = $::mta ? {
+               'postfix' => 'amavis',
+               default   => 'Debian-exim'
+       }
 
-    file {
-        "/etc/clamav/freshclam.conf":
-          source  => "puppet:///clamav/freshclam.conf",
-          require => Package["clamav-freshclam"],
-          notify  => Exec["clamav-freshclam restart"]
-          ;
-    }
-    exec { "clamav-daemon restart":
-        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
-        refreshonly => true,
-    }
-    exec { "clamav-freshclam restart":
-        path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
-        refreshonly => true,
-    }
-}
+       user { 'clamav':
+               gid     => clamav,
+               groups  => [$extra_groups],
+               require => Package['clamav-daemon']
+       }
+
+       service { 'clamav-daemon':
+               ensure  => running,
+               require => Package['clamav-daemon']
+       }
+
+       service { 'clamav-freshclam':
+               ensure  => running,
+               require => Package['clamav-freshclam']
+       }
 
+       file { [
+               '/var/lib/clamav/mbl.ndb',
+               '/var/lib/clamav/MSRBL-Images.hdb',
+               '/var/lib/clamav/MSRBL-SPAM.ndb',
+       ]:
+               ensure  => absent
+       }
+       file { '/etc/clamav-unofficial-sigs.dsa.conf':
+               require => Package['clamav-unofficial-sigs'],
+               source  => [ 'puppet:///modules/clamav/clamav-unofficial-sigs.dsa.conf' ]
+       }
+       file { '/etc/clamav-unofficial-sigs.conf':
+               require => Package['clamav-unofficial-sigs'],
+               source  => [ 'puppet:///modules/clamav/clamav-unofficial-sigs.conf' ]
+       }
+
+}