I'm looking at switching my log rotate setup to rotate logs hourly instead of daily. I think I've got the config ready to go but wanted to check whether the config would trigger a reload/restart of the process with the postrotate options?
I'm running this on ubuntu 16.04 and have copied my config from /etc/cron.daily to /etc/cron.hourly ready to go
Here's my config here from the logrotate.d/nginx file:
/var/log/nginx/*/*.log {
hourly
missingok
rotate 720
compress
delaycompress
notifempty
create 640 nginx adm
sharedscripts
postrotate
if [ -f /var/run/nginx.pid ]; then
kill -USR1 `cat /var/run/nginx.pid`
fi
endscript
}
If this does kill the process, is there a way around this step?