From 8af25bdbcc30ea5d02a8bd011713a3f5fb023bb4 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Thu, 9 Nov 2023 13:59:56 -0300 Subject: [PATCH] change hostname from apply ism policy --- build-docker-images/wazuh-indexer/config/ism-check.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-docker-images/wazuh-indexer/config/ism-check.sh b/build-docker-images/wazuh-indexer/config/ism-check.sh index fcfeeaa0..7a605399 100644 --- a/build-docker-images/wazuh-indexer/config/ism-check.sh +++ b/build-docker-images/wazuh-indexer/config/ism-check.sh @@ -1,10 +1,10 @@ #!/bin/bash - +SERVER=`hostname` if [[ -n "$INDEXER_PASSWORD" ]]; then - until [[ `curl -XGET https://0.0.0.0:9200/_cat/indices -u admin:SecretPassword -k -s | grep .opendistro_security | wc -l` -eq 1 ]] + until [[ `curl -XGET https://$SERVER:9200/_cat/indices -u admin:SecretPassword -k -s | grep .opendistro_security | wc -l` -eq 1 ]] do echo "Wazuh indexer Security is not initiaized"; sleep 30 done - bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -i 127.0.0.1 -p $INDEXER_PASSWORD + bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -p $INDEXER_PASSWORD -i $SERVER fi \ No newline at end of file