Files
confdroid_clamav/manifests/main/config.pp
Arne Teuke 44792d71c1 add cronjob
2025-06-08 15:05:28 +02:00

27 lines
891 B
Puppet

## clamav_cd::main::config.pp
# Module name: clamav_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages all aspects of configuring the module logic for
# clamav_cd.
##############################################################################
class clamav_cd::main::config (
) inherits clamav_cd::params {
include clamav_cd::main::service
# Ensure the SELinux boolean antivirus_can_scan_system is enabled if disabled
exec { 'enable_antivirus_can_scan_system':
command => '/usr/sbin/setsebool -P antivirus_can_scan_system 1',
unless => '/usr/sbin/getsebool antivirus_can_scan_system | grep --quiet "on"',
path => ['/usr/sbin', '/bin'],
}
# create a cron job to run a daily scan
cron { 'clamscan':
command => '/bin/clamscan -r / >> /var/log/clamav/daily-scan.log',
user => 'root',
hour => 2,
minute => 0,
}
}