mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user