Skip to content

Instantly share code, notes, and snippets.

@vdel26
Created February 16, 2016 14:31
Show Gist options
  • Save vdel26/2783f69f3b5ac7ecf77b to your computer and use it in GitHub Desktop.
Save vdel26/2783f69f3b5ac7ecf77b to your computer and use it in GitHub Desktop.
Logrotate configuration Openresty
/opt/openresty/nginx/logs/*.log {
compress
copytruncate
create 0644 root root
delaycompress
missingok
rotate 7
sharedscripts
postrotate
endscript
}
@salehhoushangi
Copy link

it should be postrotate
/bin/kill -HUP cat/usr/local/openresty/nginx/logs/nginx.pid 2>/dev/null 2>/dev/null || true
endscript in postscript section

@mikolajsobolewski
Copy link

i think it should be

/bin/kill -USR1 `cat /usr/local/openresty/nginx/logs/nginx.pid` 2>/dev/null 2>/dev/null || true

endscript in postscript section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment