Class: Specinfra::Command::Base::Port
- Inherits:
-
Specinfra::Command::Base
- Object
- Specinfra::Command::Base
- Specinfra::Command::Base::Port
- Defined in:
- lib/specinfra/command/base/port.rb
Direct Known Subclasses
Aix::Base::Port, Darwin::Base::Port, Freebsd::Base::Port, Openbsd::Base::Port, Redhat::Base::Port, Solaris::Base::Port
Class Method Summary collapse
Methods inherited from Specinfra::Command::Base
Class Method Details
.check_is_listening(port, options = {}) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/specinfra/command/base/port.rb', line 3 def check_is_listening(port, ={}) pattern = ":#{port} " pattern = " #{[:local_address]}#{pattern}" if [:local_address] pattern = "^#{[:protocol]} .*#{pattern}" if [:protocol] "netstat -tunl | grep -- #{escape(pattern)}" end |