mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-05-12 11:42:18 -04:00
replace MaxRetentionSec to stop excessive rotation
This commit is contained in:
parent
d39937fc6c
commit
e81e9feef3
3 changed files with 18 additions and 1 deletions
|
@ -32,7 +32,7 @@ SystemMaxFiles=10000
|
|||
#RuntimeKeepFree=
|
||||
#RuntimeMaxFileSize=
|
||||
#RuntimeMaxFiles=100
|
||||
MaxRetentionSec={{journald_max_retention_sec}}
|
||||
#MaxRetentionSec=
|
||||
MaxFileSec=1day
|
||||
#ForwardToSyslog=no
|
||||
#ForwardToKMsg=no
|
||||
|
|
9
systemd/system/systemd-journald-vacuum.service
Normal file
9
systemd/system/systemd-journald-vacuum.service
Normal 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}}
|
8
systemd/system/systemd-journald-vacuum.timer
Normal file
8
systemd/system/systemd-journald-vacuum.timer
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Run systemd-journald-vacuum hourly
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Add table
Add a link
Reference in a new issue