From b58e4e36badf44c89c82a8e60b9655a9b4507155 Mon Sep 17 00:00:00 2001
From: Jan Mach <jan.mach@cesnet.cz>
Date: Tue, 23 Apr 2019 14:52:00 +0200
Subject: [PATCH] Fix: Added separate configuration for mentat-controller.py
 module.

This module does get executed very often as root and the log file may have root privileges. It should be rotated with separate configuration. This may however raise errors with duplicate configuration by logrotate, some versions do not allow configuration overriding. We will see, how this fix fares and perhaps another solution may be necessary.
---
 conf/logrotate.conf | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/conf/logrotate.conf b/conf/logrotate.conf
index b55341c22..2ab6cb8b3 100644
--- a/conf/logrotate.conf
+++ b/conf/logrotate.conf
@@ -16,3 +16,16 @@
 	create 644 mentat mentat
 	su mentat mentat
 }
+
+/var/mentat/log/mentat-controller.py.log
+{
+	rotate 2
+	weekly
+	missingok
+	notifempty
+	compress
+	delaycompress
+	dateext
+	create 644 root root
+	su root root
+}
-- 
GitLab