Sha256: 24291008d0d5ded4570479c7736d1a8d0489e7eac38673a9437c2d75b8374dc5

Contents?: true

Size: 613 Bytes

Versions: 5

Compression:

Stored size: 613 Bytes

Contents

if File.exists? ROOT + '/unicorn.rb'
  namespace :unicorn do
    desc 'Start unicorn server'
    task :start do
      if File.exists? ROOT + '/config.ru'
        cmd = 'unicorn'
      else
        cmd = 'unicorn_rails'
      end
      sys cmd << ' -c unicorn.rb -E production -D'
    end

    desc 'Stop unicorn server'
    task :stop do
      if File.exists? ROOT + '/tmp/unicorn.pid'
        sys 'kill -QUIT `cat tmp/unicorn.pid`'
        sleep 1
      end
      sys 'rm -r tmp/*'
    end

    desc 'Hot restart unicorn server'
    task :restart do
      sys 'kill -HUP `cat tmp/unicorn.pid`'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zfben_rails_rake-0.0.18 lib/zfben_rails_rake/tasks/unicorn.rb
zfben_rails_rake-0.0.17 lib/zfben_rails_rake/tasks/unicorn.rb
zfben_rails_rake-0.0.16 lib/zfben_rails_rake/tasks/unicorn.rb
zfben_rails_rake-0.0.15 lib/zfben_rails_rake/tasks/unicorn.rb
zfben_rails_rake-0.0.14 lib/zfben_rails_rake/tasks/unicorn.rb