Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-16 20:10:04 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-16 20:10:04 +0300
commita4d15f77b5d62743c97613476dec6cea208c98a0 (patch)
treefa567f491c3a4345cbfac8b8e62a43148f43af22 /include/tests_tooling
parent9e56706aa67d3e7bc019ab17b451d801b0b7c4d3 (diff)
Differentiate between a discovered binary and running process
Diffstat (limited to 'include/tests_tooling')
-rw-r--r--include/tests_tooling30
1 files changed, 20 insertions, 10 deletions
diff --git a/include/tests_tooling b/include/tests_tooling
index f07bcdac..2090e99e 100644
--- a/include/tests_tooling
+++ b/include/tests_tooling
@@ -146,25 +146,35 @@
# SaltStack
if [ -n "${SALTMINIONBINARY}" ]; then
+ Display --indent 4 --text "- SaltStack minion" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: SaltStack (salt-minion) is installed (${SALTMINIONBINARY})"
AUTOMATION_TOOL_FOUND=1
- SALT_MINION_RUNNING=1
- Report "automation_tool_running[]=saltstack-minion"
- Display --indent 4 --text "- SaltStack minion (salt-minion)" --result "${STATUS_FOUND}" --color GREEN
+ Report "automation_tool_installed[]=saltstack-minion"
+
+ if IsRunning "salt-minion" --user "root salt"; then
+ Display --indent 6 --text "- Minion process" --result "${STATUS_RUNNING}" --color GREEN
+ LogText "Result: found SaltStack (master)"
+ SALT_MINION_RUNNING=1
+ Report "automation_tool_running[]=saltstack-minion"
+ else
+ Display --indent 6 --text "- Minion process" --result "${STATUS_NOT_RUNNING}" --color YELLOW
+ fi
+
fi
+
if [ -n "${SALTMASTERBINARY}" ]; then
+ Display --indent 4 --text "- SaltStack master (salt-master)" --result "${STATUS_FOUND}" --color GREEN
LogText "Result: SaltStack (salt-master) is installed (${SALTMASTERBINARY})"
AUTOMATION_TOOL_FOUND=1
- SALT_MASTER_RUNNING=1
- Report "automation_tool_running[]=saltstack-minion"
- Display --indent 4 --text "- SaltStack master (salt-master)" --result "${STATUS_FOUND}" --color GREEN
- else
- if IsRunning "salt-master"; then
+ Report "automation_tool_installed[]=saltstack-master"
+
+ if IsRunning "salt-master" --user "root salt"; then
+ Display --indent 6 --text "- Master process" --result "${STATUS_RUNNING}" --color GREEN
LogText "Result: found SaltStack (master)"
- AUTOMATION_TOOL_FOUND=1
SALT_MASTER_RUNNING=1
Report "automation_tool_running[]=saltstack-master"
- Display --indent 4 --text "- SaltStack (master)" --result "${STATUS_FOUND}" --color GREEN
+ else
+ Display --indent 6 --text "- Master process" --result "${STATUS_NOT_RUNNING}" --color YELLOW
fi
fi