mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Remove RETURN_CODE
This commit is contained in:
@@ -7,8 +7,6 @@
|
|||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
{%- set SUPPORTED_PACKAGES = salt['pillar.get']('elasticfleet:packages', default=ELASTICFLEETDEFAULTS.elasticfleet.packages, merge=True) %}
|
{%- set SUPPORTED_PACKAGES = salt['pillar.get']('elasticfleet:packages', default=ELASTICFLEETDEFAULTS.elasticfleet.packages, merge=True) %}
|
||||||
|
|
||||||
RETURN_CODE=0
|
|
||||||
|
|
||||||
if [ ! -f /opt/so/state/estemplates.txt ]; then
|
if [ ! -f /opt/so/state/estemplates.txt ]; then
|
||||||
echo "State file /opt/so/state/estemplates.txt not found. Running so-elasticsearch-templates-load."
|
echo "State file /opt/so/state/estemplates.txt not found. Running so-elasticsearch-templates-load."
|
||||||
|
|
||||||
@@ -103,15 +101,9 @@ if [ ! -f /opt/so/state/estemplates.txt ]; then
|
|||||||
{% else %}
|
{% else %}
|
||||||
echo "Elastic Fleet not configured. Exiting..."
|
echo "Elastic Fleet not configured. Exiting..."
|
||||||
{% endif %}
|
{% endif %}
|
||||||
RETURN_CODE=1
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
if [[ "$RETURN_CODE" != "1" ]]; then
|
|
||||||
touch /opt/so/state/estemplates.txt
|
touch /opt/so/state/estemplates.txt
|
||||||
else
|
|
||||||
echo "Errors were detected. This script will run again during the next application of the state."
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit $RETURN_CODE
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user