Skip to content

Instantly share code, notes, and snippets.

@joekr
Forked from pshima/unicorn.conf
Last active December 25, 2015 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joekr/6920129 to your computer and use it in GitHub Desktop.
Save joekr/6920129 to your computer and use it in GitHub Desktop.
/path/to/unicorn/log/unicorn.stderr.log
/path/to/production/log/production.log
{
daily
missingok
rotate 14
compress
dateext
# this is important if using "compress" since we need to call
# the "lastaction" script below before compressing:
delaycompress
# note the lack of the evil "copytruncate" option in this
# config. Unicorn supports the USR1 signal and we send it
# as our "lastaction" action:
lastaction
pid=/path/to/pid/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