-
-
Save brainwire/69b971c89145c75faa445c1fb11b6adc to your computer and use it in GitHub Desktop.
logrotate for puma on rails
This file contains 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
# file location: /etc/logrotate.d | |
/sitesroot/domain/logfolder/*.log { | |
su deploy deploy | |
daily | |
rotate 7 | |
missingok | |
dateext | |
compress | |
notifempty | |
sharedscripts | |
postrotate | |
[ -e /tmp/pids/puma.pid ] && kill -HUP `cat /tmp/pids/puma.pid` && kill -USR1 `cat /tmp/pids/puma.pid` | |
endscript | |
} | |
# kill -HUP reopen puma.*.log | |
# kill -USR1 reopen production.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment