add option to disable clamscan

This commit is contained in:
2026-09-14 11:45:57 +02:00
parent 5a9465ba15
commit 8cafb84e74
3 changed files with 33 additions and 11 deletions

View File

@@ -4,6 +4,7 @@
"authenticode",
"behaviour",
"bofh",
"clamav",
"clamd",
"clamonacc",
"clamscan",

View File

@@ -8,17 +8,35 @@ class clamav_cd::main::service (
) inherits clamav_cd::params {
require clamav_cd::main::files
if $cv_enable_clamd == true {
service { $cv_service:
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
}
} else {
service { $cv_service:
ensure => stopped,
hasstatus => true,
hasrestart => true,
enable => false,
}
}
if $cv_enable_freshclam == true {
service { $cv_freshclam:
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
}
} else {
service { $cv_freshclam:
ensure => stopped,
hasstatus => true,
hasrestart => true,
enable => false,
}
}
}

View File

@@ -33,6 +33,8 @@
# @param [String] cv_cron_user which user should run the cron job
# @param [String] cv_scan_dir which directory should be scanned
# @param [String] cv_alert_file location and name of the alert file
# @param [Boolean] cv_enable_freshclam whether to enable the freshclam service
# @param [Boolean] cv_enable_clamd whether to enable the clamd service
##############################################################################
class clamav_cd::params (
@@ -60,7 +62,8 @@ class clamav_cd::params (
String $cv_cron_user = 'root',
String $cv_scan_dir = '/',
String $cv_alert_file = 'tmp/clamav-alert.txt',
Boolean $cv_enable_freshclam = true,
Boolean $cv_enable_clamd = true,
) {
# service