Update the logrotate config to use the right permissions for the file, and to call USR1 on nginx after rotation. Update the readme to use the nginx pidfile.

This commit is contained in:
yackob03 2014-02-03 11:57:29 -05:00
parent cd1e1ec3b0
commit f2fef9fcde
2 changed files with 11 additions and 3 deletions

View file

@ -43,7 +43,7 @@ STACK=prod python -m workers.webhookworker -D
bouncing the servers: bouncing the servers:
``` ```
sudo kill -HUP <pid of nginx> sudo kill -HUP `cat /mnt/logs/nginx.pid`
kill -HUP `cat /mnt/logs/gunicorn.pid` kill -HUP `cat /mnt/logs/gunicorn.pid`
kill <pids of worker daemons> kill <pids of worker daemons>

View file

@ -6,6 +6,10 @@
missingok missingok
notifempty notifempty
create 644 root root create 644 root root
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /mnt/logs/nginx.pid`
endscript
} }
/mnt/logs/nginx.error.log { /mnt/logs/nginx.error.log {
@ -16,6 +20,10 @@
missingok missingok
notifempty notifempty
create 644 root root create 644 root root
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /mnt/logs/nginx.pid`
endscript
} }
/mnt/logs/application.log { /mnt/logs/application.log {
@ -25,9 +33,9 @@
delaycompress delaycompress
missingok missingok
notifempty notifempty
create 644 root root create 644 ubuntu ubuntu
postrotate postrotate
kill -USR1 `cat /mnt/logs/gunicorn.pid` [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /mnt/logs/gunicorn.pid`
endscript endscript
} }