]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/clamav/manifests/init.pp
variable assignment does not clone string...
[dsa-puppet.git] / modules / clamav / manifests / init.pp
index 11576b6ddfe72749cb9867b69beabd7d4aeb1e66..591d398b9e16018ec5aa9c109b642e7f29877ab7 100644 (file)
@@ -1,3 +1,11 @@
+# = Class: clamav
+#
+# Manage a clamav installation
+#
+# == Sample Usage:
+#
+#   include clamav
+#
 class clamav {
        package { [
                        'clamav-daemon',
@@ -7,12 +15,42 @@ class clamav {
                        ensure => installed
        }
 
+       $extra_groups = $::mta ? {
+               'postfix' => 'amavis',
+               default   => 'Debian-exim'
+       }
+
+       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',
+               '/var/lib/clamav/msrbl-images.hdb',
+               '/var/lib/clamav/msrbl-spam.ndb',
        ]:
-               ensure  => absent
+               ensure => absent,
+               notify => Service['clamav-daemon']
+       }
+       file { '/var/lib/clamav/.nobackup':
+               owner   => clamav,
+               mode    => '0644',
+               content => '',
+               require => Package['clamav-daemon']
        }
        file { '/etc/clamav-unofficial-sigs.dsa.conf':
                require => Package['clamav-unofficial-sigs'],