diff --git a/docker/release/config/opensearch-dashboards/opensearch-dashboards-docker-entrypoint.sh b/docker/release/config/opensearch-dashboards/opensearch-dashboards-docker-entrypoint.sh index b757fa52d2..ecfd6be9d4 100755 --- a/docker/release/config/opensearch-dashboards/opensearch-dashboards-docker-entrypoint.sh +++ b/docker/release/config/opensearch-dashboards/opensearch-dashboards-docker-entrypoint.sh @@ -177,8 +177,8 @@ if [ -d "$OPENSEARCH_DASHBOARDS_HOME/plugins/$SECURITY_DASHBOARDS_PLUGIN" ]; the if [ "$DISABLE_SECURITY_DASHBOARDS_PLUGIN" = "true" ]; then echo "Disabling OpenSearch Security Dashboards Plugin" ./bin/opensearch-dashboards-plugin remove securityDashboards - sed "/^opensearch_security/d" $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml | tee $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml - sed "s/https/http/" $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml | tee $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml + cat $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml | sed "/^opensearch_security/d" | tee $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml + cat $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml | sed "s/https/http/g" | tee $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml fi fi diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index 873d1eebbb..cb367df938 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -66,10 +66,11 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then if [ "$DISABLE_SECURITY_PLUGIN" = "true" ]; then echo "Disabling OpenSearch Security Plugin" - sed "s/plugins.security.disabled.*$/plugins.security.disabled: true" $OPENSEARCH_HOME/config/opensearch.yml | tee $OPENSEARCH_HOME/config/opensearch.yml + cat $OPENSEARCH_HOME/config/opensearch.yml | sed "/plugins.security.disabled/d" | tee $OPENSEARCH_HOME/config/opensearch.yml + echo "plugins.security.disabled: true" >> $OPENSEARCH_HOME/config/opensearch.yml else echo "Enabling OpenSearch Security Plugin" - sed "/plugins.security.disabled/d" $OPENSEARCH_HOME/config/opensearch.yml | tee $OPENSEARCH_HOME/config/opensearch.yml + cat $OPENSEARCH_HOME/config/opensearch.yml | sed "/plugins.security.disabled/d" | tee $OPENSEARCH_HOME/config/opensearch.yml fi fi