Logrotation - postrotate firing too soon?
Solution 1:
Have you tried this:
/var/log/nginx/*.log {
daily
missingok
rotate 90
dateext
compress
**delaycompress**
notifempty
create 644 root adm
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
/usr/local/bin/synclogs.sh
endscript }
Take a look at the delaycompress option, of course without "*" HTH
Solution 2:
In case anybody is wondering, compress fires off AFTER postrotate, despite what the man page says.