From b0038e42b49275b4dc384d3981e3faa3c4c01119 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sun, 3 Apr 2022 13:44:17 -0400 Subject: [PATCH] Add Systemd Journalling tweak --- ...ndencies.sh => 10-Checking_Dependencies.sh | 0 15-Tweaking_Systemd_Journalling.sh | 27 +++++++++++++++++++ ...stom_MOTD.sh => 20-Updating_Custom_MOTD.sh | 0 ...0-Checking_Topgrade_Installation_Status.sh | 0 ...s.sh => 40-Checking_Custom_Bash_Aliases.sh | 1 + ...sh => 50-Checking_IPA_Realm_Join_Status.sh | 0 6 files changed, 28 insertions(+) rename 00-Checking_Dependencies.sh => 10-Checking_Dependencies.sh (100%) create mode 100644 15-Tweaking_Systemd_Journalling.sh rename 01-Updating_Custom_MOTD.sh => 20-Updating_Custom_MOTD.sh (100%) rename 02-Checking_Topgrade_Installation_Status.sh => 30-Checking_Topgrade_Installation_Status.sh (100%) rename 03-Checking_Custom_Bash_Aliases.sh => 40-Checking_Custom_Bash_Aliases.sh (99%) rename 04-Checking_IPA_Realm_Join_Status.sh => 50-Checking_IPA_Realm_Join_Status.sh (100%) diff --git a/00-Checking_Dependencies.sh b/10-Checking_Dependencies.sh similarity index 100% rename from 00-Checking_Dependencies.sh rename to 10-Checking_Dependencies.sh diff --git a/15-Tweaking_Systemd_Journalling.sh b/15-Tweaking_Systemd_Journalling.sh new file mode 100644 index 0000000..f07af8f --- /dev/null +++ b/15-Tweaking_Systemd_Journalling.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +## Script Location +SCRIPTDIR=$(dirname $0) +source "$SCRIPTDIR/common/colors.sh" +source "$SCRIPTDIR/common/functions.sh" + +printf "$COL_LIGHT_BLUE" "* Vaccuming Systemd Journal" +journalctl --vacuum-size=50M + +printf "$COL_LIGHT_BLUE" "* Checking for Systemd Journal directory" +journal_directory="/var/log/journal" +if [ ! -d "$journal_directory" ]; then + printf "$COL_YELLOW" "** creating Systemd Journal installation directory" + mkdir $journal_directory +fi + +systemd_journald_conf="/etc/systemd/journald.conf" +cat <> $systemd_journald_conf + +#Change Logging maximums +RuntimeMaxFileSize=50 +RuntimeMaxFiles=100 +EOT + + +systemctl restart systemd-journald diff --git a/01-Updating_Custom_MOTD.sh b/20-Updating_Custom_MOTD.sh similarity index 100% rename from 01-Updating_Custom_MOTD.sh rename to 20-Updating_Custom_MOTD.sh diff --git a/02-Checking_Topgrade_Installation_Status.sh b/30-Checking_Topgrade_Installation_Status.sh similarity index 100% rename from 02-Checking_Topgrade_Installation_Status.sh rename to 30-Checking_Topgrade_Installation_Status.sh diff --git a/03-Checking_Custom_Bash_Aliases.sh b/40-Checking_Custom_Bash_Aliases.sh similarity index 99% rename from 03-Checking_Custom_Bash_Aliases.sh rename to 40-Checking_Custom_Bash_Aliases.sh index 860c2f7..07fd5b8 100644 --- a/03-Checking_Custom_Bash_Aliases.sh +++ b/40-Checking_Custom_Bash_Aliases.sh @@ -21,6 +21,7 @@ if [ -f $custom_bash_aliases_path/main.aliases ]; then . $custom_bash_aliases_path/main.aliases fi EOT + else printf "$COL_YELLOW" "** bash aliases already linked" fi diff --git a/04-Checking_IPA_Realm_Join_Status.sh b/50-Checking_IPA_Realm_Join_Status.sh similarity index 100% rename from 04-Checking_IPA_Realm_Join_Status.sh rename to 50-Checking_IPA_Realm_Join_Status.sh