From 608be30743448000d17e79a9380ac663c1d53b63 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 6 Apr 2022 07:11:52 -0400 Subject: [PATCH] dont mandatory limit --- 15-Tweaking_Systemd_Journalling.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/15-Tweaking_Systemd_Journalling.sh b/15-Tweaking_Systemd_Journalling.sh index f07af8f..26c7308 100644 --- a/15-Tweaking_Systemd_Journalling.sh +++ b/15-Tweaking_Systemd_Journalling.sh @@ -16,12 +16,22 @@ if [ ! -d "$journal_directory" ]; then fi systemd_journald_conf="/etc/systemd/journald.conf" -cat <> $systemd_journald_conf +if (whiptail --title "Systemd Journalling limits" --yes-button "yes" --no-button "no" --yesno "Do You want to join a limit systemd journalling?" 10 80) +then + if [[ $(grep -L "Change Logging maximums" $systemd_journald_conf) ]]; then + printf "$COL_YELLOW" "** Limitting" + + cat <> $systemd_journald_conf #Change Logging maximums RuntimeMaxFileSize=50 RuntimeMaxFiles=100 EOT + else + printf "$COL_YELLOW" "** not limitting" + fi + +fi systemctl restart systemd-journald