add shell script for cronjob

This commit is contained in:
Arne Teuke
2025-06-08 15:33:03 +02:00
parent 44792d71c1
commit 38a51df380
4 changed files with 56 additions and 5 deletions

View File

@@ -18,9 +18,9 @@ class clamav_cd::main::config (
# 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,
command => $cv_shell_script,
user => $cv_cron_user,
hour => $cv_cron_hour,
minute => $cv_cron_minute,
}
}

View File

@@ -47,4 +47,17 @@ class clamav_cd::main::files (
seluser => system_u,
content => template($cv_freshclam_svc_erb),
}
# shell script for scanning and alerting
file { $cv_shell_script :
ensure => file,
owner => 'root',
group => 'root',
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($cv_shell_script_erb),
}
}