Skip to content

Instantly share code, notes, and snippets.

@dakatsuka
Created November 10, 2015 05:19
Show Gist options
  • Save dakatsuka/86cb49fb5563162d1752 to your computer and use it in GitHub Desktop.
Save dakatsuka/86cb49fb5563162d1752 to your computer and use it in GitHub Desktop.
/home/rails/rails_app/shared/log/*.log {
weekly
missingok
rotate 24
dateext
compress
delaycompress
su rails rails
create 0644 rails rails
lastaction
pid=/tmp/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