summaryrefslogtreecommitdiff
path: root/net-mail/mailgraph/files/mailgraph.logrotate-new
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-mail/mailgraph/files/mailgraph.logrotate-new
reinit the tree, so we can have metadata
Diffstat (limited to 'net-mail/mailgraph/files/mailgraph.logrotate-new')
-rw-r--r--net-mail/mailgraph/files/mailgraph.logrotate-new30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-mail/mailgraph/files/mailgraph.logrotate-new b/net-mail/mailgraph/files/mailgraph.logrotate-new
new file mode 100644
index 000000000000..a48f2dd10d4d
--- /dev/null
+++ b/net-mail/mailgraph/files/mailgraph.logrotate-new
@@ -0,0 +1,30 @@
+# logrotate config for mailgraph log
+
+/var/log/mailgraph/mailgraph.log {
+ ## rotate daily
+ daily
+ ## keep 30 old copies
+ rotate 30
+ ## use .YYYYMMDD instead of .0,.1,.2 etc.
+ dateext
+ ## also rotate empty logfiles to strictly retain chronology
+ ifempty
+ ## re-create source logfile with original permissions
+ ## do NOT use copy or copytruncate!
+ create
+ ## compress on next logrotate run (e.g. next day) to give
+ ## programs the chance to close the old logfile
+ delaycompress
+ ## compress logfiles
+ compress
+ compresscmd /bin/gzip
+ compressoptions -9
+ uncompresscmd /bin/gunzip
+ ## don't throw an error when a file doesn't exist
+ missingok
+ ## restart mailgraph after rotating all logfiles
+ sharedscripts
+ postrotate
+ /etc/init.d/mailgraph restart >/dev/null
+ endscript
+}