Class: Blazing::Recipe::RestartProcesses
- Inherits:
-
Blazing::Recipe
- Object
- Blazing::Recipe
- Blazing::Recipe::RestartProcesses
- Defined in:
- lib/blazing-foreman/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 18 |
# File 'lib/blazing-foreman/recipes/restart_processes.rb', line 6 def run( = {}) super info "restarting processes" if complex_restart? processes.each do |process| restart = restart_command process system "#{sudo} initctl start #{application}-#{process} || #{sudo} initctl #{restart} #{application}-#{process}" end else system "#{sudo} initctl start #{application} || #{sudo} initctl restart #{application}" end end |