summaryrefslogtreecommitdiff
blob: a48f2dd10d4d4a816f8438b6f082ed234a40a414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
}