[root@nginx ~]# crontab -l
59 23 * * * /usr/sbin/logrotate -f /etc/logrotate.d/nginx
[root@nginx ~]# cat /etc/logrotate.d/nginx
/mnt/nginx/logs/*.log {
daily
rotate 30
missingok
notifempty
dateext
sharedscripts
postrotate
if [ -f /mnt/nginx/logs/nginx.pid ]; then
kill -USR1 cat /mnt/nginx/logs/nginx.pid
fi
endscript
}