From: Michael Tremer Date: Tue, 21 Apr 2026 09:32:11 +0000 (+0000) Subject: logrotate: Rotate Suricata logs daily X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=30ccb9ed80ee3ad70403794da4c937fd183b9bd8;p=ipfire-2.x.git logrotate: Rotate Suricata logs daily This patch also cleans up what happens. Logrotate will automatically delete any old log files and does not require any extra commands. Signed-off-by: Michael Tremer --- diff --git a/config/etc/logrotate.conf b/config/etc/logrotate.conf index c5f9883c7..2f79de933 100644 --- a/config/etc/logrotate.conf +++ b/config/etc/logrotate.conf @@ -29,14 +29,12 @@ include /etc/logrotate.d } /var/log/suricata/*.log { - weekly + daily copytruncate - compress - ifempty + notifempty missingok + sharedscripts postrotate - /bin/find /var/log/suricata -path '/var/log/suricata/[0-9]*' -prune -exec /bin/rm -rf {} \; - /bin/find /var/log/suricata -name 'fast.log.*' -mtime +28 -exec /bin/rm -rf {} \; /bin/kill -HUP `cat /var/run/suricata.pid 2> /dev/null` 2> /dev/null || true endscript } diff --git a/config/rootfiles/core/202/filelists/files b/config/rootfiles/core/202/filelists/files index ebaef1717..50fe9d2c2 100644 --- a/config/rootfiles/core/202/filelists/files +++ b/config/rootfiles/core/202/filelists/files @@ -1,3 +1,4 @@ +etc/logrotate.conf etc/rc.d/init.d/firewall etc/rc.d/init.d/sysklogd etc/rc.d/init.d/unbound