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 +}