From 0fd8a729585e86ebb20cd9d665144e11d0376f8d Mon Sep 17 00:00:00 2001 From: Dotty Dotter Date: Wed, 6 May 2026 02:04:17 +0200 Subject: [PATCH] feat(#171): logrotate-Config fuer /var/log/gwoe-*.log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts/logrotate-gwoe.conf — wird bei sudo-Install zu /etc/logrotate.d/gwoe kopiert. Schema: - weekly, rotate 8 (8 Wochen Historie) - compress + delaycompress (letzte Rotation greppable) - missingok + notifempty (Cron-Logs koennen ja leer sein) - create 0644 dotty dotty (passt zur Permissions-Konvention der bestehenden gwoe-*.log) - sharedscripts (zukunftssicher fuer postrotate-Hooks) Install via sudo cp + sudo logrotate -d (Dry-Run), siehe Inline- Doku im File. Kein Server-seitiger Auto-Install — root-Aktion liegt beim Maintainer. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/logrotate-gwoe.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/logrotate-gwoe.conf diff --git a/scripts/logrotate-gwoe.conf b/scripts/logrotate-gwoe.conf new file mode 100644 index 0000000..f6f9a92 --- /dev/null +++ b/scripts/logrotate-gwoe.conf @@ -0,0 +1,25 @@ +# logrotate-Config fuer alle GWÖ-Antragspruefer-Cron-Logs (#171). +# +# Installation auf dem vserver (root-Privileges): +# sudo cp /opt/gwoe-antragspruefer-dev/scripts/logrotate-gwoe.conf \ +# /etc/logrotate.d/gwoe +# sudo logrotate -d /etc/logrotate.d/gwoe # Dry-Run, prueft Syntax +# sudo logrotate /etc/logrotate.d/gwoe # Sofort-Test (optional) +# +# Tipps: +# - logrotate-Cron laeuft typischerweise einmal pro Tag (/etc/cron.daily/logrotate). +# - Bei "create"-Variante mit fester Owner-Zeile entfaellt die Frage, +# ob der Cron-User die Datei nach Rotation noch beschreiben darf. +# - "delaycompress" laesst die letzte rotation noch greppable, was bei +# Forensik nach Cron-Bug Gold wert ist. + +/var/log/gwoe-*.log { + weekly + rotate 8 + compress + delaycompress + missingok + notifempty + create 0644 dotty dotty + sharedscripts +}