From c6ec794d4bb3b74f0cd767385328d128721c1dbf Mon Sep 17 00:00:00 2001 From: Boris Gallet Date: Tue, 12 Mar 2024 17:25:05 +0100 Subject: [PATCH] new: [myc-update] add hard limit to system journal usage to 200M --- bin/myc-update | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/myc-update b/bin/myc-update index 745f385..44fc123 100755 --- a/bin/myc-update +++ b/bin/myc-update @@ -113,6 +113,15 @@ sed -ri 's/^# (export LS_OPTIONS=.--color=auto.)/\1/; EOF fi +## add option to limit log size +journalctl_config_file="/etc/systemd/journald.conf" +if [ -f "$journalctl_config_file" ] && + ! grep -q "^SystemMaxUse=" "$journalctl_config_file"; then + Wrap -d "Limit system journal logs to 200M" <