Module: PostgresFeature

Defined in:
lib/puppet/feature/postgres_running.rb

Overview

See the file “LICENSE” for the full license governing this code.

Class Method Summary collapse

Class Method Details

.postgres_running_checkObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/puppet/feature/postgres_running.rb', line 7

def self.postgres_running_check
  Puppet.debug 'Feature postgres_running checking availability'
  proc = Puppet::Util::Execution.execute('netstat -lnp | grep  postgres', :failonfail => false, :combine => true)
  if proc == ''
    Puppet.debug 'Feature postgres_running **NOT** available'
    false
  else
    Puppet.debug 'Feature postgres_running available'
    true
  end
end