Skip to content

Instantly share code, notes, and snippets.

@perfectfoolish
Created November 8, 2013 06:34
Show Gist options
  • Save perfectfoolish/7367083 to your computer and use it in GitHub Desktop.
Save perfectfoolish/7367083 to your computer and use it in GitHub Desktop.
logrotate.conf refer to http://ruby-china.org/topics/3704 and manpage of logrotate
/home/git/labhub/log/*.log {
daily
missingok
rotate 5
compress
dateext
delaycompress
notifempty
copytruncate
lastaction
pid=/home/git/labhub/tmp/pids/unicorn.pid
sudo test -s $pid && sudo kill -USR1 "$(cat $pid)"
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment