Nginx Log Rotation Quick Question
/home/*/logs/*.log {
daily
missingok
rotate 3
compress
delaycompress
notifempty
sharedscripts
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi; \
endscript
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
endscript
}
This is basically a replica of the nginx logrotate script that is already in /etc/logrotate.d
I guess my question is. Is this the best way to accomplish this. What are you guys doing?