Skip to content

Instantly share code, notes, and snippets.

@curt
Created February 9, 2010 17:54
Show Gist options
  • Save curt/299465 to your computer and use it in GitHub Desktop.
Save curt/299465 to your computer and use it in GitHub Desktop.
Capistrano recipe for restarting Rails background process with Monit
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