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.
This commit is contained in:
Salamandar
2022-04-15 13:15:33 +00:00
committed by GitHub
parent 1b54098da6
commit f99ca5714b

View File

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