Example Logrotate files for Mailman3
Hi,
Does anyone have any usable Logrotate files for Mailman3 (especially for the web stuff)?
Will look to create my own if no one comes forward but if anyone has anything they are willing to share it would be fab.
Thanks. Andrew.
On 6/30/20 2:10 PM, Andrew Hodgson wrote:
Hi,
Does anyone have any usable Logrotate files for Mailman3 (especially for the web stuff)?
Here are two. They differ in the name and location of the Django log. Both of them signal gunicorn to reopen its logs. If you are using uWSGI or some other WSGI support, you'll need to figure that out.
In this one, all the logs including Django's are in /opt/mailman/mm/var/logs/
/opt/mailman/mm/var/logs/*.log { missingok sharedscripts su mailman mailman postrotate /opt/mailman/mm/bin/mailman reopen &>/dev/null || true if [ -r /opt/mailman/mm/var/gunicorn.pid ]; then PID=
cat /opt/mailman/mm/var/gunicorn.pid
kill -s USR1 $PID fi endscript }
This one is actually two because the Django log is in /var/log/ rather than /opt/mailman/mm/var/logs/.
/opt/mailman/mm/var/logs/*.log { missingok sharedscripts su mailman mailman postrotate /opt/mailman/mm/bin/mailman reopen &>/dev/null || true if [ -r /opt/mailman/mm/var/gunicorn.pid ]; then PID=
cat /opt/mailman/mm/var/gunicorn.pid
kill -s USR1 $PID fi endscript }
} /var/log/mailman-web/*.log { missingok notifempty delaycompress su mailman mailman }
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
On 6/30/20 2:10 PM, Andrew Hodgson wrote:
Does anyone have any usable Logrotate files for Mailman3 (especially for the web stuff)?
Here are two. They differ in the name and location of the Django log. Both of them signal gunicorn to reopen its logs. If you are using uWSGI or some other WSGI support, you'll need to figure that out.
Thanks for this the first one with minor mods works a treat. I may update it in the future to keep old logs around but not that bothered at the moment. The access.log from the web components had got to over 200MB in a few weeks.
Andrew.
participants (2)
-
Andrew Hodgson
-
Mark Sapiro