Skip to content

Commit

Permalink
auto start service for ubuntu and gentoo
Browse files Browse the repository at this point in the history
  • Loading branch information
bolasblack committed May 20, 2015
1 parent 542f6e8 commit 8665c17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/capistrano/tasks/unicorn.rake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ namespace :unicorn do
on roles :app do
sudo_upload! template('unicorn_init.erb'), unicorn_initd_file
execute :chmod, '+x', unicorn_initd_file
sudo 'update-rc.d', '-f', fetch(:unicorn_service), 'defaults'
if test 'hash update-rc.d'
sudo 'update-rc.d', '-f', fetch(:unicorn_service), 'defaults'
elsif test 'hash rc-config'
sudo 'rc-config', 'add', fetch(:unicorn_service), 'defaults'
end
end
end

Expand Down

0 comments on commit 8665c17

Please sign in to comment.