Method: Webbynode::RemoteExecutor#exec

Defined in:
lib/webbynode/remote_executor.rb

#exec(cmd, echo = false, exit_code = false) ⇒ Object



40
41
42
43
44
45
46
47
# File 'lib/webbynode/remote_executor.rb', line 40

def exec(cmd, echo=false, exit_code=false)
  begin
    ssh.execute(cmd, echo, exit_code)
  rescue Errno::ECONNREFUSED
    raise Webbynode::Command::CommandError,
      "Could not connect to #{@ip}. Please check your settings and your network connection and try again."
  end
end