Hi,

I've provided a minimal patch; given this is a Debian-specific file and not something you're going to have to deal with upstream about, is there any chance of you applying it for bookworm, please?

Log rotation isn't just about disk filling, other systems rely on its correct operation (hence my view this is RC) - I picked up on this when I realised that fail2ban had stopped working for ssh! It looks in /var/log/auth.log for entries, and that file was empty because of this failure.

Thank you for your consideration,

Matthew

From 4f17fb24be2d1f34a772298258f2352d864e7a75 Mon Sep 17 00:00:00 2001
From: Matthew Vernon <matt...@debian.org>
Date: Fri, 17 Feb 2023 06:39:43 +0000
Subject: [PATCH] attempt to rotate on non-systemd systems (Closes: #1031399)

On non-systemd systems, /etc/init.d/rsyslog is sometimes available; in
those cases, use it (via invoke-rc.d) to do log rotation.
---
 debian/rsyslog-rotate | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rsyslog-rotate b/debian/rsyslog-rotate
index ef3954b1..143523ab 100755
--- a/debian/rsyslog-rotate
+++ b/debian/rsyslog-rotate
@@ -2,4 +2,6 @@
 
 if [ -d /run/systemd/system ]; then
     systemctl kill -s HUP rsyslog.service
+elif [ -x /etc/init.d/rsyslog ]; then
+    invoke-rc.d rsyslog rotate > /dev/null
 fi
-- 
2.39.1

Reply via email to