[clamav-users] freshclam-sleep doesn't exist in epel8 packages
Kenneth Porter
shiva at sewingwitch.com
Tue Nov 1 22:24:30 UTC 2022
On 11/1/2022 10:51 AM, khodor barakat via clamav-users wrote:
> do you think i should create a freshclam.service with timer and
> reference the clamav-freshclam.service , also in freshclam.conf the
> checks by default is set to 12 checks by day and you can change that,
freshclam-sleep is a hack to allow cron to start freshclam at a random
time. A systemd timer unit already has this ability, so it can invoke
its service at a random start time. Just invoke freshclam as a type
oneshot service (the default) with no arguments. The service will
attempt to perform the update once and then exit. The matching systemd
timer unit will be responsible for the policy of repeating the attempts.
Compare to certbot-renew.timer, which renews LetsEncrypt certificates
(below). You'll want to change the OnCalendar value to something
reasonable for ClamAV signature updates. End users can install a
"drop-in" file to customize a systemd unit without editing the original
package files. This is useful to change the frequency of freshclam
invocations. Look for "drop-in" here:
https://www.freedesktop.org/software/systemd/man/systemd.unit.html
File certbot-renew.timer, an example systemd timer unit:
[Unit]
Description=This is the timer to set the schedule for automated renewals
[Timer]
OnCalendar=*-*-* 00/12:00:00
RandomizedDelaySec=12hours
Persistent=true
[Install]
WantedBy=timers.target
More information about the clamav-users
mailing list