Class: Blazing::Recipe::RestartProcesses
- Inherits:
-
Blazing::Recipe
- Object
- Blazing::Recipe
- Blazing::Recipe::RestartProcesses
- Defined in:
- lib/blazing-upstart/recipes/restart_processes.rb
Instance Method Summary collapse
Instance Method Details
#run(target_options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/blazing-upstart/recipes/restart_processes.rb', line 6 def run( = {}) super info "restarting processes" if complex_restart? processes.each do |process| system "#{sudo} initctl start #{application}-#{process} || #{sudo} initctl #{restart_command(process)} #{application}-#{process}" end else system "#{sudo} initctl start #{application} || #{sudo} initctl restart #{application}" end end |