Skip to content

Instantly share code, notes, and snippets.

@henrik
Created February 21, 2009 14:27
Show Gist options
  • Save henrik/68054 to your computer and use it in GitHub Desktop.
Save henrik/68054 to your computer and use it in GitHub Desktop.
Passenger+Rails/Merb logrotate example config.
# Install logrotate on OS X:
# sudo port clean --all logrotate && sudo port install logrotate
# Add e.g. this to your crontab:
# /opt/local/sbin/logrotate -s /Users/deploy/.logrotate/sites.status /Users/deploy/.logrotate/sites.conf
# This file would be sites.conf.
# See http://overstimulate.com/articles/logrotate-rails-passenger for more info.
daily
missingok
rotate 30
compress
delaycompress
sharedscripts
/Users/deploy/Sites/rails.example.com/shared/log/*.log {
postrotate
touch /Users/deploy/Sites/rails.example.com/current/tmp/restart.txt
endscript
}
/Users/deploy/Sites/merb.example.com/shared/log/*.log {
postrotate
touch /Users/deploy/Sites/merb.example.com/current/tmp/restart.txt
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment