Skip to content

Commit

Permalink
Fixes #16470: Postgresql service name is not detected properly on sles12
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdall committed Jan 2, 2020
1 parent a3eb4e2 commit 4f9947f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion techniques/system/server-roles/1.0/component-check.cf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ bundle agent root_component_check
redhat::
"apache_dist_specific_name" string => "httpd";

any::
!sles_12::
"postgresql_service_name" string => execresult("${paths.systemctl} --no-ask-password list-unit-files --type service | ${paths.awk} -F'.' '{print $1}' | ${paths.grep} -E \"^postgresql-?[0-9]*$\" | tail -n 1", "useshell");
sles_12::
"postgresql_service_name" string => execresult("chkconfig 2>/dev/null | ${paths.awk} '{ print $1 }' | ${paths.grep} 'postgresql' | tail -n 1", "useshell");

any::
"technique_name" string => "server-roles";

# Reporting
Expand Down

0 comments on commit 4f9947f

Please sign in to comment.