mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-18 06:52:56 +01:00
declare NEW_LIST outside jinja logic
This commit is contained in:
@@ -34,13 +34,15 @@ fi
|
|||||||
CURRENT_LIST=$(jq -c -r '.item.hosts' <<< "$RAW_JSON")
|
CURRENT_LIST=$(jq -c -r '.item.hosts' <<< "$RAW_JSON")
|
||||||
CURRENT_HASH=$(sha1sum <<< "$CURRENT_LIST" | awk '{print $1}')
|
CURRENT_HASH=$(sha1sum <<< "$CURRENT_LIST" | awk '{print $1}')
|
||||||
|
|
||||||
|
declare -a NEW_LIST=()
|
||||||
|
|
||||||
{# If we select to not send to manager via SOC, then omit the code that adds manager to NEW_LIST #}
|
{# If we select to not send to manager via SOC, then omit the code that adds manager to NEW_LIST #}
|
||||||
{% if ELASTICFLEETMERGED.enable_manager_output %}
|
{% if ELASTICFLEETMERGED.enable_manager_output %}
|
||||||
# Create array & add initial elements
|
# Create array & add initial elements
|
||||||
if [ "{{ GLOBALS.hostname }}" = "{{ GLOBALS.url_base }}" ]; then
|
if [ "{{ GLOBALS.hostname }}" = "{{ GLOBALS.url_base }}" ]; then
|
||||||
NEW_LIST=("{{ GLOBALS.url_base }}:5055")
|
NEW_LIST+=("{{ GLOBALS.url_base }}:5055")
|
||||||
else
|
else
|
||||||
NEW_LIST=("{{ GLOBALS.url_base }}:5055" "{{ GLOBALS.hostname }}:5055")
|
NEW_LIST+=("{{ GLOBALS.url_base }}:5055" "{{ GLOBALS.hostname }}:5055")
|
||||||
fi
|
fi
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user