mirror of
https://github.com/wazuh/wazuh-docker.git
synced 2025-11-02 21:13:30 +00:00
Enabling xpack plugins by default. Fixing a bug that can cause that the desabilitation of plugins wasnt applied at kibana
This commit is contained in:
@@ -68,25 +68,5 @@ curl -XPUT "$el_url/_cluster/settings" -H 'Content-Type: application/json' -d'
|
||||
}
|
||||
'
|
||||
|
||||
#Disabling xpack features
|
||||
|
||||
elasticsearch_config_file="/usr/share/elasticsearch/config/elasticsearch.yml"
|
||||
if grep -Fq "#xpack features" "$elasticsearch_config_file";
|
||||
then
|
||||
declare -A CONFIG_MAP=(
|
||||
[xpack.ml.enabled]=$XPACK_ML
|
||||
)
|
||||
for i in "${!CONFIG_MAP[@]}"
|
||||
do
|
||||
if [ "${CONFIG_MAP[$i]}" != "" ]; then
|
||||
sed -i 's/.'"$i"'.*/'"$i"': '"${CONFIG_MAP[$i]}"'/' $elasticsearch_config_file
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "
|
||||
#xpack features
|
||||
xpack.ml.enabled: $XPACK_ML
|
||||
" >> $elasticsearch_config_file
|
||||
fi
|
||||
|
||||
echo "Elasticsearch is ready."
|
||||
|
||||
Reference in New Issue
Block a user