From 1c22cfebb9c695b6ac4a164982f619f0bf0c1c62 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Mon, 23 Sep 2019 18:55:02 -0500 Subject: improve journal removal --- clean-logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clean-logs.sh b/clean-logs.sh index 96316d6..5d79011 100755 --- a/clean-logs.sh +++ b/clean-logs.sh @@ -16,7 +16,7 @@ if [[ -d /var/log/journal || -d /run/log/journal/ ]]; then systemctl stop systemd-journald journal_dirs1=$(find /var/log/journal/ -maxdepth 1 -type d -name "a*") journal_dirs2=$(find /run/log/journal/ -maxdepth 1 -type d -name "f*") - journal_dirs3=$(find /run/log/journal/ -maxdepth 1 -type d -name "[0-9]*") + journal_dirs3=$(find /run/log/journal/ /var/log/journal/ -maxdepth 1 -type d -name "[0-9]*" 2> /dev/null) journal_dirs="$journal_dirs1 $journal_dirs2 $journal_dirs3"; for j in $journal_dirs; do -- cgit v1.2.3