From dc9ff33a8f6c13fe5a1bf33a14ef80502e4b7000 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 17 Jan 2023 11:03:32 -0500 Subject: [PATCH] Explicitly use systemctl in logrotate For some reason (Debian bug?) the default rsyslog-rotate script was not properly rotating rsyslog logfiles. Instead, explicitly call systemctl kill -s HUP for this, using a full path. --- roles/base/templates/etc/logrotate.d/rsyslog.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/base/templates/etc/logrotate.d/rsyslog.j2 b/roles/base/templates/etc/logrotate.d/rsyslog.j2 index 1f17878..9d9e67e 100644 --- a/roles/base/templates/etc/logrotate.d/rsyslog.j2 +++ b/roles/base/templates/etc/logrotate.d/rsyslog.j2 @@ -16,6 +16,6 @@ delaycompress sharedscripts postrotate - /usr/lib/rsyslog/rsyslog-rotate &>/dev/null + /usr/bin/systemctl kill -s HUP rsyslog.service endscript }