Sha256: 949bdd2cea7d50dada7508c67543ece739ee35d34094ca982429f83fe60704fb

Contents?: true

Size: 791 Bytes

Versions: 14

Compression:

Stored size: 791 Bytes

Contents

# logrotate.erb.conf
# Logrotate config for <%= fetch(:application) %> <%= fetch(:stage) %>
# Generated at <%= Time.now.strftime("%d.%m.%Y, %H:%M") %>

<%= unicorn_log_dir %>/*.log {
    daily
    missingok
    rotate 180
    compress
    dateext
    su <%= fetch(:unicorn_user) %> <%= fetch(:unicorn_user) %>

    # 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:
    # USR1 - reopen all logs owned by the master and all workers
    lastaction
      pid=<%= fetch(:unicorn_pid) %>
      test -s $pid && kill -USR1 "$(cat $pid)"
    endscript
}

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
capistrano-unicorn-nginx-5.2.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-5.1.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-5.0.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-4.2.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-4.1.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-4.0.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-osx-3.4.0.4 lib/generators/capistrano/unicorn_nginx_osx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-osx-3.4.0.3 lib/generators/capistrano/unicorn_nginx_osx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-osx-3.4.0.2 lib/generators/capistrano/unicorn_nginx_osx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-osx-3.4.0.1 lib/generators/capistrano/unicorn_nginx_osx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-3.4.0 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-3.3.3 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-3.3.2 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb
capistrano-unicorn-nginx-3.3.1 lib/generators/capistrano/unicorn_nginx/templates/unicorn-logrotate.rb.erb