gentoo-ebuilds/app-antivirus/clamav/files/freshclam.logrotate
Michael Orlitzky 7662242105
app-antivirus/clamav: new logrotate files for v0.103.0.
Now that each ClamAV daemon has its own OpenRC service, we
separate the logrotate entries as well. This fixes an old
bug where we relied on the service manager being OpenRC.

Closes: https://bugs.gentoo.org/508520
Closes: https://bugs.gentoo.org/709780
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
2020-09-22 23:23:24 -04:00

17 lines
631 B
Text

# This script is intended to rotate the logs for freshclam in its default
# configuration on Gentoo, where freshclam writes to its own log file but
# does not rotate that file itself. The freshclam daemon is capable of
# rotating its own logs; if you have "LogRotate yes" in freshclam.conf
# then you do not need this script (and should disable it). Likewise,
# if you are logging to syslog (LogSyslog yes), this is redundant.
/var/log/clamav/freshclam.log {
su clamav clamav
missingok
postrotate
if test -f /run/freshclam.pid; then
/bin/kill -HUP $(cat /run/freshclam.pid)
else
true
fi
endscript
}