Fix opensearch-env always sources the environment from hardcoded file (#875)
distribution/bin/opensearch-env always sources the environment from the default environment file /etc/default/opensearch. This is an issue if we want to run multiple instances of OpenSearch on the same host. This change lets users override the default behavior by not sourcing the default environment file in case OPENSEARCH_PATH_CONF is set. Signed-off-by: Xue Zhou <xuezhou@amazon.com>
This commit is contained in:
parent
23d604571c
commit
e3d86baa5a
|
@ -78,7 +78,9 @@ fi
|
|||
|
||||
export HOSTNAME=$HOSTNAME
|
||||
|
||||
${source.path.env}
|
||||
if [ -z "$OPENSEARCH_PATH_CONF" ]; then
|
||||
${source.path.env}
|
||||
fi
|
||||
|
||||
if [ -z "$OPENSEARCH_PATH_CONF" ]; then
|
||||
echo "OPENSEARCH_PATH_CONF must be set to the configuration path"
|
||||
|
|
Loading…
Reference in New Issue