Skip to content

Instantly share code, notes, and snippets.

View jfayad's full-sized avatar

Julien jfayad

View GitHub Profile
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