Skip to content

Commit

Permalink
change hostname from apply ism policy
Browse files Browse the repository at this point in the history
  • Loading branch information
vcerenu committed Nov 9, 2023
1 parent a94fcfa commit 8af25bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build-docker-images/wazuh-indexer/config/ism-check.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8af25bd

Please sign in to comment.