[Pkg-nginx-maintainers] Bug#858595: Bug#858595: nginx logrotate doesn't properly switch to new logfiles

Paul Tötterman paul.totterman at gmail.com
Thu Mar 30 18:05:56 UTC 2017


> # lsof -p $(systemctl show -pMainPID nginx| cut -d= -f2)|grep /var/log

This actually showed no *.log.1 -files being open, but lsof -c nginx
|grep ... does

> # invoke-rc.d nginx rotate
> # lsof -p $(systemctl show -pMainPID nginx| cut -d= -f2)|grep /var/log

Didn't start showing *.log.1 -files open, but lsof -c nginx still does

systemctl reload nginx did close the *.log.1 -files.

> Also note that logrotate runs the postrotate script only when the
> matching log files are not empty (notifempty flag). If those files are
> empty, like in your case, the command isn't triggered.

right

Cheers,
Paul



More information about the Pkg-nginx-maintainers mailing list