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 9dc2dbf690..b757fa52d2 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 -i /^opensearch_security/d $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml - sed -i 's/https/http/' $OPENSEARCH_DASHBOARDS_HOME/config/opensearch_dashboards.yml + 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 fi fi diff --git a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh index d93c1828ab..873d1eebbb 100755 --- a/docker/release/config/opensearch/opensearch-docker-entrypoint.sh +++ b/docker/release/config/opensearch/opensearch-docker-entrypoint.sh @@ -66,11 +66,10 @@ if [ -d "$OPENSEARCH_HOME/plugins/$SECURITY_PLUGIN" ]; then if [ "$DISABLE_SECURITY_PLUGIN" = "true" ]; then echo "Disabling OpenSearch Security Plugin" - sed -i '/plugins.security.disabled/d' $OPENSEARCH_HOME/config/opensearch.yml - echo "plugins.security.disabled: true" >> $OPENSEARCH_HOME/config/opensearch.yml + sed "s/plugins.security.disabled.*$/plugins.security.disabled: true" $OPENSEARCH_HOME/config/opensearch.yml | tee $OPENSEARCH_HOME/config/opensearch.yml else echo "Enabling OpenSearch Security Plugin" - sed -i '/plugins.security.disabled/d' $OPENSEARCH_HOME/config/opensearch.yml + sed "/plugins.security.disabled/d" $OPENSEARCH_HOME/config/opensearch.yml | tee $OPENSEARCH_HOME/config/opensearch.yml fi fi