Class: RestartApache
- Inherits:
-
Object
- Object
- RestartApache
- Defined in:
- lib/commands/restart-apache.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/commands/restart-apache.rb', line 2 def execute with_target_vms([], :single_target => true) do |vm| @logger.debug("Restarting apache on remote machine") env = vm.action(:ssh_run, :ssh_run_command => "sudo service apache2 restart") # Exit with the exit status of the command or a 0 if we didn't # get one. exit_status = env[:ssh_run_exit_status] || 0 return exit_status end 0 end |