Created
February 9, 2010 17:54
-
-
Save curt/299465 to your computer and use it in GitHub Desktop.
Capistrano recipe for restarting Rails background process with Monit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :background do | |
task :restart do | |
run "[ -f #{shared_path}/pids/background.pid ] && kill `cat #{shared_path}/pids/background.pid`" | |
sudo "monit start app_background" | |
end | |
end | |
after "deploy", "background:restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment