mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #1842 from Security-Onion-Solutions/issue/1764
show if disabled regardless of highstate status
This commit is contained in:
@@ -121,6 +121,10 @@ parse_status() {
|
|||||||
[[ $container_state = "$state" ]] && printf $SUCCESS_STRING && return 0
|
[[ $container_state = "$state" ]] && printf $SUCCESS_STRING && return 0
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for state in "${BAD_STATUSES[@]}"; do
|
||||||
|
[[ " ${DISABLED_CONTAINERS[@]} " =~ " ${service_name} " ]] && printf $DISABLED_STRING && return 0
|
||||||
|
done
|
||||||
|
|
||||||
# if a highstate has finished running since the system has started
|
# if a highstate has finished running since the system has started
|
||||||
# then the containers should be running so let's check the status
|
# then the containers should be running so let's check the status
|
||||||
if [ $LAST_HIGHSTATE_END -ge $SYSTEM_START_TIME ]; then
|
if [ $LAST_HIGHSTATE_END -ge $SYSTEM_START_TIME ]; then
|
||||||
@@ -133,13 +137,7 @@ parse_status() {
|
|||||||
|
|
||||||
# This is technically not needed since the default is error state
|
# This is technically not needed since the default is error state
|
||||||
for state in "${BAD_STATUSES[@]}"; do
|
for state in "${BAD_STATUSES[@]}"; do
|
||||||
if [[ " ${DISABLED_CONTAINERS[@]} " =~ " ${service_name} " ]]; then
|
[[ $container_state = "$state" ]] && printf $ERROR_STRING && return 1
|
||||||
printf $DISABLED_STRING
|
|
||||||
return 0
|
|
||||||
elif [[ $container_state = "$state" ]]; then
|
|
||||||
printf $ERROR_STRING
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf $ERROR_STRING && return 1
|
printf $ERROR_STRING && return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user