vi /etc/logrotate.d/config.conf
-----------------------------
/data/logs/config.com.log {
daily
rotate 5
missingok
notifempty
sharedscripts
postrotate
test ! -f /usr/local/nginx/logs/nginx.pid || kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
endscript
}
------------------------------
使之生效:
logrotate =f /etc/logrotate.d/
阅读(621) | 评论(0) | 转发(0) |