logrotate例子

在/etc/logrotate.d目录下增加了一个abc文件

/data/log/nginx/*log {
    create 0644 root root
    daily
    rotate 10
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
        /bin/kill -USR1 $(cat /var/run/nginx.pid 2>/dev/null) 2>/dev/null || :
    endscript
}