Last active
August 29, 2015 14:06
-
-
Save sharshenov/b8371f4ea4f09318415d to your computer and use it in GitHub Desktop.
Logrotate template for rails apps
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
# save as /etc/logrotate.d/APPNAME | |
/home/deploy/apps/APPNAME/shared/log/*.log { | |
su deploy deploy | |
daily | |
missingok | |
rotate 30 | |
compress | |
delaycompress | |
notifempty | |
copytruncate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
check it:
sudo logrotate /etc/logrotate.d/APPNAME -f