Update journald configuration in auto_post_install.sh

This commit is contained in:
MacRimi
2025-10-21 13:56:37 +02:00
committed by GitHub
parent edc5a2c0f2
commit 4d50339041

View File

@@ -964,26 +964,26 @@ EOF
[ "$KEEP_MB" -lt 8 ] && KEEP_MB=8 [ "$KEEP_MB" -lt 8 ] && KEEP_MB=8
sed -i '/^\[Journal\]/,$d' /etc/systemd/journald.conf 2>/dev/null || true sed -i '/^\[Journal\]/,$d' /etc/systemd/journald.conf 2>/dev/null || true
tee -a /etc/systemd/journald.conf >/dev/null <<EOF tee -a /etc/systemd/journald.conf >/dev/null <<EOF
[Journal] [Journal]
Storage=persistent Storage=persistent
SplitMode=none SplitMode=none
RateLimitIntervalSec=30s RateLimitIntervalSec=30s
RateLimitBurst=1000 RateLimitBurst=1000
ForwardToSyslog=no ForwardToSyslog=no
ForwardToWall=no ForwardToWall=no
Seal=no Seal=no
Compress=yes Compress=yes
SystemMaxUse=${USE_MB}M SystemMaxUse=${USE_MB}M
SystemKeepFree=${KEEP_MB}M SystemKeepFree=${KEEP_MB}M
RuntimeMaxUse=${RUNTIME_MB}M RuntimeMaxUse=${RUNTIME_MB}M
MaxLevelStore=warning MaxLevelStore=warning
MaxLevelSyslog=warning MaxLevelSyslog=warning
MaxLevelKMsg=warning MaxLevelKMsg=warning
MaxLevelConsole=notice MaxLevelConsole=notice
MaxLevelWall=crit MaxLevelWall=crit
EOF EOF
systemctl restart systemd-journald >/dev/null 2>&1 || true systemctl restart systemd-journald >/dev/null 2>&1 || true
msg_ok "$(translate "Backup created:") /etc/systemd/journald.conf.bak.$(date +%Y%m%d-%H%M%S)" msg_ok "$(translate "Backup created:") /etc/systemd/journald.conf.bak.$(date +%Y%m%d-%H%M%S)"