Skip to content

Instantly share code, notes, and snippets.

@PatrickTulskie
Created May 27, 2011 23:01
Show Gist options
  • Save PatrickTulskie/996359 to your computer and use it in GitHub Desktop.
Save PatrickTulskie/996359 to your computer and use it in GitHub Desktop.
Restart Passenger or Unicorn in Capistrano
task :restart, :roles => :app, :except => { :no_release => true } do
socket_path = "#{shared_path}/sockets/unicorn.sock"
restart_command = "if [ -e #{socket_path} ]; then /etc/init.d/beenverified_com upgrade; else touch #{current_path}/tmp/restart.txt; fi"
run restart_command
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment