mirror of https://github.com/CISOfy/lynis.git
Differentiate between a discovered binary and running process
This commit is contained in:
parent
9e56706aa6
commit
a4d15f77b5
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue