Created
March 19, 2012 17:13
-
-
Save kyledrake/2119737 to your computer and use it in GitHub Desktop.
How to rotate logs with Rainbows!
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
# Put this in a logrotate file (like /etc/logrotate.d/yourcompany): | |
/var/log/yourcompany/website.log | |
{ | |
daily | |
rotate 7 | |
compress | |
missingok | |
notifempty | |
sharedscripts | |
size 5M | |
create 644 youruser yourgroup | |
postrotate | |
/bin/kill -USR1 `cat /var/run/yourcompany/website.pid 2>/dev/null` 2> /dev/null || true | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment