mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
Only load if so-elastic-fleet-common exists
This commit is contained in:
@@ -15,6 +15,7 @@ default_conf_dir=/opt/so/conf
|
|||||||
# Define a default directory to load pipelines from
|
# Define a default directory to load pipelines from
|
||||||
ELASTICSEARCH_TEMPLATES="$default_conf_dir/elasticsearch/templates/"
|
ELASTICSEARCH_TEMPLATES="$default_conf_dir/elasticsearch/templates/"
|
||||||
|
|
||||||
|
if [ -f /usr/sbin/so-elastic-fleet-common ]; then
|
||||||
# Wait for ElasticSearch to initialize
|
# Wait for ElasticSearch to initialize
|
||||||
echo -n "Waiting for ElasticSearch..."
|
echo -n "Waiting for ElasticSearch..."
|
||||||
COUNT=0
|
COUNT=0
|
||||||
@@ -72,5 +73,8 @@ cd ${ELASTICSEARCH_TEMPLATES}/index
|
|||||||
echo "Loading Security Onion index templates..."
|
echo "Loading Security Onion index templates..."
|
||||||
for i in *; do TEMPLATE=${i::-14}; echo "$TEMPLATE"; so-elasticsearch-query _index_template/$TEMPLATE -d@$i -XPUT 2>/dev/null; echo; done
|
for i in *; do TEMPLATE=${i::-14}; echo "$TEMPLATE"; so-elasticsearch-query _index_template/$TEMPLATE -d@$i -XPUT 2>/dev/null; echo; done
|
||||||
echo
|
echo
|
||||||
|
else
|
||||||
|
echo "Elastic Fleet not configured. Exiting..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user