Skip to content

Instantly share code, notes, and snippets.

@chuyeow
Created September 10, 2013 04:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuyeow/6504932 to your computer and use it in GitHub Desktop.
Save chuyeow/6504932 to your computer and use it in GitHub Desktop.
Unicorn sample logrotate file
/var/railsapps/appname/shared/log/*.log {
daily
missingok
rotate 3
compress
dateext
delaycompress
lastaction
pid=/var/railsapps/appname/shared/pids/unicorn.pid
test -s $pid && kill -USR1 "$(cat $pid)"
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment