Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Created March 31, 2014 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhellberg/9890555 to your computer and use it in GitHub Desktop.
Save peterhellberg/9890555 to your computer and use it in GitHub Desktop.
Capistrano 3 and Foreman: Fix upstart exports to stop jobs correctly under upstart 0.6.5
namespace :foreman do
# See https://github.com/ddollar/foreman/issues/97
desc "Fix upstart exports to stop jobs correctly"
task :fix_upstart_export do
on roles(:app) do
execute :sed, "-i.bak 's/ -c / --session-command /' #{shared_path}/etc/init/application-web-1.conf"
execute :sed, "-i.bak 's/ -c / --session-command /' #{shared_path}/etc/init/application-worker-1.conf"
end
end
end
after 'foreman:export', 'foreman:fix_upstart_export'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment