Add Systemd Journalling tweak

This commit is contained in:
deathbybandaid 2022-04-03 13:44:17 -04:00
parent 450dcaeace
commit b0038e42b4
6 changed files with 28 additions and 0 deletions

View File

@ -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 <<EOT >> $systemd_journald_conf
#Change Logging maximums
RuntimeMaxFileSize=50
RuntimeMaxFiles=100
EOT
systemctl restart systemd-journald

View File

@ -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