replace MaxRetentionSec to stop excessive rotation

This commit is contained in:
Daniel Micay 2024-02-13 11:16:17 -05:00
parent d39937fc6c
commit e81e9feef3
3 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,9 @@
[Unit]
Description=Vacuum journald logs
After=systemd-journald.service
[Service]
Type=oneshot
User=root
Group=root
ExecStart=/usr/bin/journalctl --vacuum-time={{journald_max_retention_sec}}

View file

@ -0,0 +1,8 @@
[Unit]
Description=Run systemd-journald-vacuum hourly
[Timer]
OnCalendar=hourly
[Install]
WantedBy=timers.target