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