/home/huginn/huginn/log/*.log {
  daily
  missingok
  rotate 180
  # must use with delaycompress below
  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.  Puma supports the HUP signal for reopening logs
  # configured via stdout_redirect, so we send it here:
  lastaction
    pid=/home/huginn/huginn/tmp/pids/puma.pid
    if test -s $pid; then kill -HUP "$(cat $pid)"; fi
  endscript
}
