在我的/etc/logrotate.d/nginx
我看到,
/var/log/nginx/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 nginx adm
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
endscript
}
Run Code Online (Sandbox Code Playgroud)
postrotate 脚本看起来像是杀死了 nginx 进程,这没有意义,所以我一定是错的。
它在做什么?