Sha256: 10182cc242ac2e1b7603b140c64b6c259cca741fbf6c86b94fccbe4c984156c9

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

require 'capistrano/novafabrica/helper'

configuration = Capistrano::Configuration.respond_to?(:instance) ?
  Capistrano::Configuration.instance(:must_exist) :
  Capistrano.configuration(:must_exist)

configuration.load do
  
  after "deploy:update_code", "unicorn:restart"
  
  _cset :unicorn_ctrl, "/etc/init.d/unicorn"

  namespace :unicorn do

    desc "start unicorn"
    task :start do
      "#{unicorn_ctrl} start"
    end

    desc "stop unicorn"
    task :stop do
      "#{unicorn_ctrl} stop"
    end

    desc "stop and start unicorn"
    task :restart do
      tomcat.stop
      tomcat.start
    end

    desc "tail :current_path/log/unicorn.stderr.log"
    task :tail do
      stream "tail -f #{current_path}/log/unicorn.stderr.log"
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano-novafabrica-1.0.3 lib/capistrano/novafabrica/unicorn.rb