28 lines
666 B
Bash
28 lines
666 B
Bash
#!/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
|