lib/plur/capistrano/upstart.rb in plur-0.0.3 vs lib/plur/capistrano/upstart.rb in plur-0.0.4
- old
+ new
@@ -1,8 +1,8 @@
Capistrano::Configuration.instance(:must_exist).load do
namespace :upstart do
- _cset(:service_name) { "app/#{application}" }
+ _cset(:service_name) { application }
desc "Start the application services"
task :start, roles: :app do
run "#{sudo} service #{service_name} start"
end
@@ -16,7 +16,9 @@
task :restart, roles: :app do
run "#{sudo} service #{service_name} start || #{sudo} service #{service_name} restart"
end
end
- after 'deploy:restart', 'upstart:restart'
+ after 'deploy:restart' do
+ upstart.restart if plur_callback
+ end
end