add shell script for cronjob
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user