diff --git a/tunnel/tunnel.nim b/tunnel/tunnel.nim index a69a1df..03c39fb 100644 --- a/tunnel/tunnel.nim +++ b/tunnel/tunnel.nim @@ -38,8 +38,10 @@ proc killCmd() = let controllers = collectControllers() if controllers.len == 0: quit 0 for c in controllers: - echo bbfmt"removing file: [b]{c}" - removeFile c + let host = c.lastPathPart().split("-")[2] + let code = exitSsh(host) + if code != 0: + quit $bb"[red][[Error]failed to exit connection for host: " & host proc show() = ## show active connections