使用示例:
1
2
3
4
5
6
7
8
9
10
11
12
13
/home/xxoo.com/www/log/*.log {
daily
missingok
rotate 3
compress
delaycompress
notifempty
create 664 nobody nobody
sharedscripts
postrotate
/etc/init.d/nginx reload > /dev/null
endscript
}
1
2
3
4
5
6
7
8
9
10
11
12
/data/www/ruby-china/current/log/production.log {
weekly
missingok
rotate 12
compress
dateext
delaycompress
lastaction
pid=/data/www/ruby-china/current/tmp/pids/unicorn.pid
sudo test -s $pid && sudo kill -USR1 "$(cat $pid)"
endscript
}