Created
December 22, 2014 18:42
-
-
Save vdv/93996936dbfc1e2d669f to your computer and use it in GitHub Desktop.
logrotate rails logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/deployer/site/shared/log/nginx-*.log { | |
weekly | |
missingok | |
rotate 10 | |
compress | |
delaycompress | |
notifempty | |
create 0640 deployer deployer | |
postrotate | |
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` | |
endscript | |
} | |
/home/deployer/site/shared/log/production.log { | |
weekly | |
missingok | |
rotate 30 | |
compress | |
delaycompress | |
notifempty | |
create 0640 deployer deployer | |
postrotate | |
pid=/home/deployer/site/shared/tmp/pids/unicorn.pid | |
[ ! -f $pid ] || kill -USR1 `cat $pid` | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment