ich möchte ein paar Logfiles nicht von Samstag auf Sonntag rotieren lassen, sondern von Sonntag auf Montag. Leider funktioniert dieser rotate nicht. Ich muss jedes Mal auf der Console ein "service rsyslog restart" durchführen.
Das logfile rotiert. Aus ufw.log wird ufw.log.1 und ein neues ufw.log wird angelegt. Also Logrotate funktioniert aus meiner Sicht.
Allerdings schreibt der Syslog weiter in das neue ufw.log.1. Auf einer anderen Maschine das gleiche Problem, nur hier schreibt der syslog in beide Dateien.
Nehme ich bei weekly die 1 weg, ist alles i. O. nur nicht an dem Wochentag wo ich es gerne hätte.
Wo liegt mein Config-Fehler?
Danke für Eure Tipps im voraus.
LG Pixelpirat
Meine dazu gehörenden Config-files
In /etc/logrotate.d/ufw
Code: Alles auswählen
/var/log/ufw.log
{
rotate 8
weekly 1
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d rsyslog rotate >/dev/null 2>&1 || true
endscript
}
Code: Alles auswählen
# Log kernel generated UFW log messages to file
:msg,contains,"[UFW " /var/log/ufw.log
# Uncomment the following to stop logging anything that matches the last rule.
# Doing this will stop logging kernel generated UFW log messages to the file
# normally containing kern.* messages (eg, /var/log/kern.log)
& ~
Code: Alles auswählen
-rw-r----- 1 root adm 1099199 6. Apr 16:40 /var/log/ufw.log
-rw-r----- 1 root adm 8200247 6. Apr 06:52 /var/log/ufw.log.1
-