From 764c18c2180b7b3aced6b41d031197e2fb2a54c3 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 29 Oct 2017 10:52:42 +0100 Subject: Code enhancements, improve detection for Puppet --- include/tests_tooling | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include/tests_tooling') diff --git a/include/tests_tooling b/include/tests_tooling index 64debcde..6b408eeb 100644 --- a/include/tests_tooling +++ b/include/tests_tooling @@ -88,8 +88,7 @@ Report "automation_tool_running[]=cf-agent" Display --indent 4 --text "- CFEngine (cf-agent)" --result "${STATUS_FOUND}" --color GREEN fi - IsRunning "cf-server" - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "cf-server"; then LogText "Result: found CFEngine server" AUTOMATION_TOOL_FOUND=1 CFENGINE_SERVER_RUNNING=1 @@ -137,8 +136,7 @@ Display --indent 4 --text "- Puppet (agent)" --result "${STATUS_FOUND}" --color GREEN fi - IsRunning "puppet master" - if [ ${RUNNING} -eq 1 ]; then + if IsRunning --full "puppet master"; then LogText "Result: found puppet master" AUTOMATION_TOOL_FOUND=1 PUPPET_MASTER_RUNNING=1 @@ -161,8 +159,7 @@ Report "automation_tool_running[]=saltstack-minion" Display --indent 4 --text "- SaltStack master (salt-master)" --result "${STATUS_FOUND}" --color GREEN else - IsRunning "salt-master" - if [ ${RUNNING} -eq 1 ]; then + if IsRunning "salt-master"; then LogText "Result: found SaltStack (master)" AUTOMATION_TOOL_FOUND=1 SALT_MASTER_RUNNING=1 @@ -335,8 +332,7 @@ Display --indent 2 --text "- Checking presence of Snort" --result "${STATUS_FOUND}" --color GREEN fi - IsRunning snort - if [ ${SNORT_RUNNING} -eq 1 ]; then + if IsRunning "snort"; then SNORT_FOUND=1 SNORT_RUNNING=1 SNORT_LOG=$(${PSBINARY} | ${AWKBINARY} -F-.. '/snort/ {print $4}' | ${HEADBINARY} -1) -- cgit v1.2.3