mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
FIX #823 wrong postgres path detection
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
This commit is contained in:
parent
c94751fcf9
commit
7d986c2d17
1 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,13 @@ module Inspec::Resources
|
||||||
@conf_dir = '/var/lib/postgres/data'
|
@conf_dir = '/var/lib/postgres/data'
|
||||||
@conf_path = File.join @conf_dir, 'postgresql.conf'
|
@conf_path = File.join @conf_dir, 'postgresql.conf'
|
||||||
|
|
||||||
|
when 'centos', 'redhat'
|
||||||
|
@service = 'postgresql'
|
||||||
|
@version = inspec.command('ls /var/lib/pgsql/').stdout.chomp
|
||||||
|
@data_dir = "/var/lib/pgsql/#{@version}/data"
|
||||||
|
@conf_dir = "/var/lib/pgsql/#{@version}/data"
|
||||||
|
@conf_path = File.join @conf_dir, 'postgresql.conf'
|
||||||
|
|
||||||
else
|
else
|
||||||
@service = 'postgresql'
|
@service = 'postgresql'
|
||||||
@data_dir = '/var/lib/postgresql'
|
@data_dir = '/var/lib/postgresql'
|
||||||
|
|
Loading…
Reference in a new issue