From f99ca5714b5145a106989e38300a0d74cadc263b Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Fri, 15 Apr 2022 13:15:33 +0000 Subject: [PATCH] armbian-truncate-logs: Use journalctl --quiet (#3684) By default, cron sends an email to the system admin if it finds anything in the stderr of the process. journalctl sends "diag output" to stderr (see https://github.com/systemd/systemd/issues/380). The easiest way to prevent sporadic emails is to call journalctl with --quiet. --- packages/bsp/common/usr/lib/armbian/armbian-truncate-logs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsp/common/usr/lib/armbian/armbian-truncate-logs b/packages/bsp/common/usr/lib/armbian/armbian-truncate-logs index 3c2921f27a..ec01a785e5 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-truncate-logs +++ b/packages/bsp/common/usr/lib/armbian/armbian-truncate-logs @@ -29,5 +29,5 @@ if [ $logusage -ge $treshold ]; then # remove /usr/bin/find /var/log -name '*.[0-9]' -or -name '*.gz' | xargs -r rm -f # vacuum systemd-journald - [ -d /var/log/journal ] && journalctl --vacuum-size=${JOURNAL_SIZE} + [ -d /var/log/journal ] && journalctl --quiet --vacuum-size=${JOURNAL_SIZE} fi