48
48
// ForServerOnPort uses ForCommand to check for process listening on the given port
50
return ForCommand(c, fmt.Sprintf(`(?msU)^.*tcp.*0\.0\.0\.0:%d .*`, port), "netstat", "-tapn")
50
return ForCommand(c, fmt.Sprintf(`(?msU)^.*%s .*:%d .* LISTEN.*`, protocol, port),
53
54
// forCommand uses ForFunction to check for the execCommand output