Class: Utils::Netstat

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/utils/netstat.rb

Instance Method Summary collapse

Instance Method Details

#running?(port) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/utils/netstat.rb', line 7

def running?(port)
  ! self.send(:`, "netstat -an | grep LISTEN | grep #{port}").empty?
end