lib/con_ssh.rb in con_ssh-0.0.8 vs lib/con_ssh.rb in con_ssh-0.1.0

- old
+ new

@@ -60,12 +60,22 @@ private def ssh c port = (c.port && c.port != DEFAULT_PORT) ? "-p #{ c.port } " : '' user = c.user ? "#{ c.user }@" : '' - knock c.host, c.knock if c.knock + + if c.knock + puts "knock`ing" + knock c.host, c.knock + sleep 1 + end + system "ssh #{port}#{user}#{c.host}" - knock c.host, c.unknock if c.unknock + + if c.unknock + puts "unknock`ing" + knock c.host, c.unknock + end end def knock host, ports unless has_knock msg = "Skipping knock!