BUG 12036: logwatch now starts at 00:05am to avoid conflicts with logrotate

Message ID 20190831201319.1490-1-matthias.fischer@ipfire.org
State Accepted
Commit 7ca4deda497cfafcb26979335a8eddeec55d086d
Headers
Series BUG 12036: logwatch now starts at 00:05am to avoid conflicts with logrotate |

Commit Message

Matthias Fischer Aug. 31, 2019, 8:13 p.m. UTC
  Problem:
Every once in a while 'logwatch' creates an empty log file with 0 Bytes.

Probably 'logwatch' conflicts with the logrotate job which is
launched at the same time.

To avoid this in the future, the start of logwatch was postponed for
four minutes.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
---
 config/cron/crontab | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/config/cron/crontab b/config/cron/crontab
index 4561f4a24..56801394e 100644
--- a/config/cron/crontab
+++ b/config/cron/crontab
@@ -31,7 +31,7 @@  HOME=/
 */5 * * * *	[ -f "/var/ipfire/red/active" ] && /usr/bin/ddns update-all
 
 # Logwatch
-01 0 * * *	/usr/local/bin/logwatch > /var/log/logwatch/`date -I -d yesterday`; \
+05 0 * * *	/usr/local/bin/logwatch > /var/log/logwatch/`date -I -d yesterday`; \
 		LOGWATCH_KEEP=$(sed -ne 's/^LOGWATCH_KEEP=\([0-9]\+\)$/\1/p' /var/ipfire/logging/settings); \
 		find /var/log/logwatch/ -ctime +${LOGWATCH_KEEP=56} -exec rm -f '{}' ';'