mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Load custom component templates in so-elasticsearch-templates-load
This commit is contained in:
@@ -60,6 +60,15 @@ echo "Loading Security Onion component templates..."
|
|||||||
for i in *; do TEMPLATE=$(echo $i | cut -d '.' -f1); echo "$TEMPLATE"; {{ ELASTICCURL }} -k ${ELASTICSEARCH_AUTH} -s -XPUT -L https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_component_template/$TEMPLATE -H 'Content-Type: application/json' -d@$i 2>/dev/null; echo; done
|
for i in *; do TEMPLATE=$(echo $i | cut -d '.' -f1); echo "$TEMPLATE"; {{ ELASTICCURL }} -k ${ELASTICSEARCH_AUTH} -s -XPUT -L https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_component_template/$TEMPLATE -H 'Content-Type: application/json' -d@$i 2>/dev/null; echo; done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
if [ -d ${ELASTICSEARCH_TEMPLATES}/component/custom ]; then
|
||||||
|
# Load custom component templates
|
||||||
|
cd ${ELASTICSEARCH_TEMPLATES}/component/custom
|
||||||
|
|
||||||
|
echo "Loading custom component templates..."
|
||||||
|
for i in *; do TEMPLATE=$(echo $i | cut -d '.' -f1); echo "$TEMPLATE"; curl -K /opt/so/conf/elasticsearch/curl.config -k ${ELASTICSEARCH_AUTH} -s -XPUT -L https://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_component_template/$TEMPLATE -H 'Content-Type: application/json' -d@$i 2>/dev/null; echo; done
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
# Load SO index templates
|
# Load SO index templates
|
||||||
cd ${ELASTICSEARCH_TEMPLATES}/index
|
cd ${ELASTICSEARCH_TEMPLATES}/index
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user