Browse files

* correctly handle monit request

* create crontab before restarting, so issues in restart don't cause problems
  • Loading branch information...
1 parent f054496 commit 558687c64b5596c5e19b264fb30fbb92fca86fbe @dudemeister dudemeister committed Jul 27, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/deploy/recipes/protonet.rb
View
7 lib/deploy/recipes/protonet.rb
@@ -17,6 +17,7 @@ def latest_deploy
def monit_command(command = "")
puts "\nrunning monit command #{command}"
run_now! "/usr/sbin/monit -c #{config.get(:shared_path)}/config/monit_ptn_node -l #{config.get(:shared_path)}/log/monit.log -p #{config.get(:shared_path)}/pids/monit.pid #{command}"
+ sleep 2
end
def bundle_cleanup
@@ -48,9 +49,9 @@ def deploy
:clean_up,
:link_current,
:deploy_monit,
+ :load_crontab,
:restart_services,
- :restart_apache,
- :load_crontab
+ :restart_apache
]
self.class.run_actions(self)
end
@@ -69,10 +70,8 @@ def deploy_monit
# and restart monit
monit_command "quit"
- sleep 2
# restarts it
monit_command
- sleep 2
monit_command "monitor all"
sleep 2
monit_command "start all"

0 comments on commit 558687c

Please sign in to comment.