class Specinfra::Command::Solaris::Base::Port
Public Class Methods
check_is_listening(port, opts=nil)
click to toggle source
# File lib/specinfra/command/solaris/base/port.rb, line 3 def check_is_listening(port, opts=nil) regexp = "\\.#{port} " "netstat -an 2> /dev/null | grep -- LISTEN | grep -- #{escape(regexp)}" end
check_is_listening_with_protocol(port, protocol)
click to toggle source
# File lib/specinfra/command/solaris/base/port.rb, line 8 def check_is_listening_with_protocol(port, protocol) regexp = ".*\\.#{port} " "netstat -an -P #{escape(protocol)} 2> /dev/null | grep -- LISTEN | grep -- #{escape(regexp)}" end