lib/plur/capistrano/upstart.rb in plur-0.0.2 vs lib/plur/capistrano/upstart.rb in plur-0.0.3
- old
+ new
@@ -1,19 +1,21 @@
Capistrano::Configuration.instance(:must_exist).load do
namespace :upstart do
+ _cset(:service_name) { "app/#{application}" }
+
desc "Start the application services"
task :start, roles: :app do
- run "#{sudo} service #{application} start"
+ run "#{sudo} service #{service_name} start"
end
desc "Stop the application services"
task :stop, roles: :app do
- run "#{sudo} service #{application} stop"
+ run "#{sudo} service #{service_name} stop"
end
desc "Restart the application services"
task :restart, roles: :app do
- run "#{sudo} service #{application} start || #{sudo} service #{application} restart"
+ run "#{sudo} service #{service_name} start || #{sudo} service #{service_name} restart"
end
end
after 'deploy:restart', 'upstart:restart'
end