Method: Inspec::Resources::Postgres#initialize

Defined in:
lib/inspec/resources/postgres.rb

#initializePostgres

Returns a new instance of Postgres.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/inspec/resources/postgres.rb', line 10

def initialize
  # determine dirs and service based on versions
  determine_dirs
  determine_service

  # print warnings if the dirs do not exist
  verify_dirs

  if !@version.to_s.empty? && !@conf_dir.to_s.empty?
    @conf_path = File.join @conf_dir, "postgresql.conf"
  else
    @conf_path = nil
    return skip_resource "Seems like PostgreSQL is not installed on your system"
  end
end