summaryrefslogtreecommitdiff
blob: 68ee9b361668e172dfee47304aa84ad7c4417b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This script is intended to rotate the logs for clamd in its default
# configuration on Gentoo, where clamd writes to its own log file but
# does not rotate that file itself. The clamd daemon is capable of
# rotating its own logs; if you have "LogRotate yes" in clamd.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/clamd.log {
  su clamav clamav
  missingok
  postrotate
    if test -f /run/clamd.pid; then
      /bin/kill -HUP $(cat /run/clamd.pid)
    else
      true
    fi
  endscript
}