Add Systemd Journalling tweak
This commit is contained in:
parent
450dcaeace
commit
b0038e42b4
27
15-Tweaking_Systemd_Journalling.sh
Normal file
27
15-Tweaking_Systemd_Journalling.sh
Normal 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
|
||||
@ -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
|
||||
Loading…
Reference in New Issue
Block a user