This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defp aegir_commad(command) do | |
# open ssh connection to terminal | |
case ssh_connect do | |
{:ok, connection} -> | |
#str = SSHEx.stream connection, '#{command}', exec_timeout: 120000 | |
ping = "ping -c " <> to_string(:rand.uniform(5)) <> " www.google.com" | |
IO.puts ping | |
str = SSHEx.stream connection, '#{ping}' | |
IO.inspect str |