Skip to content

Instantly share code, notes, and snippets.

@kiote
Created December 22, 2011 16:06
Show Gist options
  • Save kiote/1510816 to your computer and use it in GitHub Desktop.
Save kiote/1510816 to your computer and use it in GitHub Desktop.
namespace :deploy do
task :restart do
run "if [ -f #{unicorn_pid} ]; then kill -USR2 `cat #{unicorn_pid}`; else cd #{deploy_to}/current && bundle exec unicorn_rails -c #{unicorn_conf} -E #{rails_env} -D; fi"
end
task :start do
run "bundle exec unicorn_rails -c #{unicorn_conf} -E #{rails_env} -D"
end
task :stop do
run "if [ -f #{unicorn_pid} ]; then kill -QUIT `cat #{unicorn_pid}`; fi"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment