切割的前提是服务的脚本放在/var/log下面,而且以.log结尾
FW=nginx
A=daily
B=weekly
C=yearly
/var/log/$FW/*.log {
$A
missingok
rotate 52
compress
delaycompress
notifempty
create 640 $FW adm
sharedscripts
postrotate
if [ -f /var/run/$FW.pid ]; then
kill -USR1 `cat /var/run/$FW.pid`
fi
endscript
}