From 6cd7a38cdfb6da7f974e1745d2770a2f4782459f 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 SystemMaxUse=200M for journalctl --- bin/myc-update | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/myc-update b/bin/myc-update index 745f385..790acac 100755 --- a/bin/myc-update +++ b/bin/myc-update @@ -113,6 +113,18 @@ sed -ri 's/^# (export LS_OPTIONS=.--color=auto.)/\1/; EOF fi +# add option to /etc/systemd/journald.conf SystemMaxUse=200M +journalctl_config_file="/etc/systemd/journald.conf" +if [ -f $journalctl_config_file ]; then + Wrap -d "Define SystemMaxUse=200M for journalctl if param not already set" <<'EOF' || exit 1 +if grep -q "^SystemMaxUse=" $journalctl_config_file; then + echo "SystemMaxUse already defined " +else + echo "SystemMaxUse=200M" >> $journalctl_config_file + systemctl restart systemd-journald.service +fi +EOF +fi for keyfile in {/root,/home/debian}/.ssh/authorized_keys; do [ -e "$keyfile" ] || continue