add option to disable clamscan
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -4,6 +4,7 @@
|
||||
"authenticode",
|
||||
"behaviour",
|
||||
"bofh",
|
||||
"clamav",
|
||||
"clamd",
|
||||
"clamonacc",
|
||||
"clamscan",
|
||||
|
||||
@@ -8,17 +8,35 @@ class clamav_cd::main::service (
|
||||
) inherits clamav_cd::params {
|
||||
require clamav_cd::main::files
|
||||
|
||||
service { $cv_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
||||
service { $cv_freshclam:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user