Sha256: ff85f180554f068547972296e733a0602fbf00eff8f462a0ce677892569d9e88

Contents?: true

Size: 384 Bytes

Versions: 2

Compression:

Stored size: 384 Bytes

Contents

namespace :deploy do
  desc 'Commands for unicorn application'
  %w(start stop force-stop restart upgrade reopen-logs).each do |command|
    task command.to_sym do
      on roles(:app), in: :sequence, wait: 5 do
        sudo "/etc/init.d/unicorn_#{fetch(:full_app_name)} #{command}"
      end
    end
  end
end

# Automatically restart after a deploy
after 'deploy', 'deploy:restart'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capistrano-cookbook-0.2.1 lib/capistrano/cookbook/tasks/restart.cap
capistrano-cookbook-0.2.0 lib/capistrano/cookbook/tasks/restart.cap