Sha256: bbbe1f6bf8baa21a1653266e7f38777ac04ea05b4d9f846639fe9efcf56f6616

Contents?: true

Size: 641 Bytes

Versions: 14

Compression:

Stored size: 641 Bytes

Contents

namespace :monit do
  desc 'Restart monit'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      execute 'sudo', '/etc/init.d/monit restart'
    end
  end

  desc 'Stop monit'
  task :stop do
    on roles(:app), in: :sequence, wait: 5 do
      execute 'sudo', '/etc/init.d/monit stop'
    end
  end

  desc 'Start monit'
  task :start do
    on roles(:app), in: :sequence, wait: 5 do
      execute 'sudo', '/etc/init.d/monit start'
    end
  end

  desc 'Exec monit command'
  task :exec, :command do |task, args|
    on roles(:app), in: :sequence, wait: 5 do
      execute 'sudo', 'monit', args[:command]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
j-cap-recipes-0.0.15 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.14 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.13 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.12 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.11 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.10 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.9 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.8 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.7 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.5 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.4 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.3 lib/j-cap-recipes/tasks/monit.rake
j-cap-recipes-0.0.2 lib/capistrano-recipes/tasks/monit.rake
j-cap-recipes-0.0.1 lib/capistrano-recipes/tasks/monit.rake