generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb in axtro-rubber-1.2.3 vs generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb in axtro-rubber-1.5.7

- old
+ new

@@ -1,9 +1,10 @@ namespace :rubber do - namespace :monit do + namespace :monit do + rubber.allow_optional_tasks(self) # monit needs to get stopped first and started last so that it doesn't # mess with us restarting everything as part of a deploy. before "rubber:pre_stop", "rubber:monit:stop" @@ -11,15 +12,15 @@ after "rubber:post_start", "rubber:monit:start" after "rubber:post_restart", "rubber:monit:start" desc "Start monit daemon monitoring" task :start do - run "/etc/init.d/monit start" + rsudo "service monit start" end desc "Stop monit daemon monitoring" - task :stop, :on_error => :continue do - run "/etc/init.d/monit stop" + task :stop do + rsudo "service monit stop; exit 0" end desc "Restart monit daemon monitoring" task :restart do stop