* Vu, Hong-Duc V. via clamav-users <clamav-users@lists.clamav.net>:
> Hello everyone,
> 
> I'm running clamav 103.9 on RHEL8 and RHEL7 from the EPEL repository. I 
> notice the configuration file has a feature that rotates logs when it reaches 
> a size I can configure: LogFileMaxSize. Is there an option in the 
> configuration file that also compresses the log file when it rotates? I 
> understand the logrotate service can do this but I would prefer if I could 
> configure this in the clamav configuration file /etc/clamd.d/scan.conf along 
> with LogFileMaxSize.
> 
> Can this be added to a future release?

Use logrotate:
==============

/var/log/clamav/clamav.log {
     rotate 7
     daily
     compress
     delaycompress
     create 640  clamav adm
     postrotate
     if [ -d /run/systemd/system ]; then
        systemctl -q is-active clamav-daemon && systemctl kill --signal=SIGHUP 
clamav-daemon || true
     else
        invoke-rc.d clamav-daemon reload-log > /dev/null || true
     fi
     endscript
     }


/var/log/clamav/freshclam.log {
     rotate 28
     daily
     compress
     delaycompress
     missingok
     create 640  clamav adm
     postrotate
     if [ -d /run/systemd/system ]; then 
        systemctl -q is-active clamav-freshclam && systemctl kill 
--signal=SIGHUP clamav-freshclam || true
     else
        invoke-rc.d clamav-freshclam reload-log > /dev/null ||true
     fi
     endscript
     }
               

-- 
Ralf Hildebrandt
Charité - Universitätsmedizin Berlin
Geschäftsbereich IT | Abteilung Netz | Netzwerk-Administration
Invalidenstraße 120/121 | D-10115 Berlin

Tel. +49 30 450 570 155
ralf.hildebra...@charite.de
https://www.charite.de
_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

Reply via email to