adds file and dirs controls
This commit is contained in:
@@ -26,4 +26,16 @@ class cd_clamav::main::dirs (
|
|||||||
|
|
||||||
require cd_clamav::main::install
|
require cd_clamav::main::install
|
||||||
|
|
||||||
|
# config.d dir
|
||||||
|
file { $cv_config_d_dir:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,31 @@ class cd_clamav::main::files (
|
|||||||
|
|
||||||
require cd_clamav::main::dirs
|
require cd_clamav::main::dirs
|
||||||
|
|
||||||
|
# clamd config file
|
||||||
|
file { $cv_clamd_config_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template($cv_clamd_config_erb),
|
||||||
|
# notify => Service[$cv_service],
|
||||||
|
}
|
||||||
|
|
||||||
|
# freshclam config file
|
||||||
|
file { $cv_freshclam_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0600',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template($cv_freshclam_erb,
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,13 +28,22 @@
|
|||||||
class cd_clamav::params (
|
class cd_clamav::params (
|
||||||
|
|
||||||
# installation
|
# installation
|
||||||
$reqpackages = ['clamav','clamav-update','clamd'],
|
$reqpackages = ['clamav','clamav-update','clamd'],
|
||||||
$pkg_ensure = 'latest',
|
$pkg_ensure = 'present',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$cv_service = ''
|
# service
|
||||||
|
$cv_service = 'clamd@.service'
|
||||||
|
|
||||||
|
# dirs
|
||||||
|
$cv_config_d_dir = '/etc/clamd.d'
|
||||||
|
|
||||||
|
# files
|
||||||
|
$cv_clamd_config_file = "${cv_config_d_dir}/scan.conf"
|
||||||
|
$cv_clamd_config_erb = 'cd_clamav/scan_conf.erb'
|
||||||
|
$cv_freshclam_file = '/etc/freshclam.conf'
|
||||||
|
$cv_freshclam_erb = 'cd_clamav/freshclam_conf.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
## Please read the freshclam.conf(5) manual before editing this file.
|
## Please read the freshclam.conf(5) manual before editing this file.
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
# Comment or remove the line below.
|
# Comment or remove the line below.
|
||||||
#Example
|
#Example
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user