PageRenderTime 35ms CodeModel.GetById 33ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/logrotate.d/proftpd-basic

http://github.com/brinkman83/bashrc
#! | 37 lines | 36 code | 1 blank | 0 comment | 0 complexity | 761b01cb36ef45a9e137c74cabbad236 MD5 | raw file
 1/var/log/proftpd/proftpd.log 
 2/var/log/proftpd/controls.log 
 3{
 4	weekly
 5	missingok
 6	rotate 7
 7	compress
 8	delaycompress
 9	notifempty
10	create 640 root adm
11	sharedscripts
12	postrotate
13		# reload could be not sufficient for all logs, a restart is safer
14		invoke-rc.d proftpd restart 2>/dev/null >/dev/null || true
15	endscript
16}
17
18/var/log/proftpd/xferlog
19/var/log/proftpd/xferreport
20{
21	monthly
22	missingok
23	rotate 7
24	compress
25	delaycompress
26	notifempty
27	create 640 root adm
28	sharedscripts
29	prerotate
30	endscript
31	postrotate
32		# reload could be not sufficient for all logs, a restart is safer
33		invoke-rc.d proftpd restart 2>/dev/null >/dev/null || true
34		# run ftpstats on past transfer log
35		ftpstats -a -r -l 2 -d -h -f /var/log/proftpd/xferlog.0 2>/dev/null >/var/log/proftpd/xferreport || true
36	endscript
37}