From e28ed83d7e7ce1d938e7f10745a8b58e3e94f928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Thu, 2 Apr 2015 09:37:53 +0000 Subject: [PATCH] Mailman: add a logrotate file --- roles/mailman/tasks/main.yml | 5 +++++ roles/mailman/templates/mailman.logrotate.j2 | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 roles/mailman/templates/mailman.logrotate.j2 diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml index 489f34c245..6345a05817 100644 --- a/roles/mailman/tasks/main.yml +++ b/roles/mailman/tasks/main.yml @@ -118,6 +118,11 @@ copy: src=hyperkitty.logrotate.conf dest=/etc/logrotate.d/hyperkitty +# XXX: to remove when the RPM can be used +- name: mailman logging -- rotation + template: src=mailman.logrotate.j2 + dest=/etc/logrotate.d/mailman3 + # # HyperKitty + Postorius setup diff --git a/roles/mailman/templates/mailman.logrotate.j2 b/roles/mailman/templates/mailman.logrotate.j2 new file mode 100644 index 0000000000..5975814267 --- /dev/null +++ b/roles/mailman/templates/mailman.logrotate.j2 @@ -0,0 +1,11 @@ +{{ mailman_webui_basedir }}/var/logs/*.log { + missingok + sharedscripts + su mailman mailman + postrotate + /bin/kill -HUP `cat /run/mailman3/master.pid 2>/dev/null` 2>/dev/null || true + # Don't run "mailman3 reopen" with SELinux on here in the logrotate + # context, it will be blocked + #/usr/bin/mailman3 reopen >/dev/null 2>&1 || true + endscript +}