diff --git a/snap/local/runtime-helpers/bin/source-env-file.sh b/snap/local/runtime-helpers/bin/source-env-file.sh index 57e65c88eb..1a9a203cb2 100755 --- a/snap/local/runtime-helpers/bin/source-env-file.sh +++ b/snap/local/runtime-helpers/bin/source-env-file.sh @@ -8,7 +8,9 @@ BINPATH="${ARGV[0]}" # binary name == service name/key SERVICE=$(basename "$BINPATH") -ENV_FILE="$SNAP_DATA/config/$SERVICE/overrides.env" +if [ -z $ENV_FILE ]; then + ENV_FILE="$SNAP_DATA/config/$SERVICE/overrides.env" +fi TAG="edgex-$SERVICE."$(basename "$0") if [ -f "$ENV_FILE" ]; then diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 22ba422aeb..4a8cfa58ba 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -132,7 +132,7 @@ apps: command-chain: - bin/source-env-file.sh environment: - ENV_FILE: $SNAP_DATA/config/security-bootstrapper/res/security-bootstrapper.env + ENV_FILE: $SNAP_DATA/config/security-bootstrapper/overrides.env SECRETSTORE_SERVERNAME: localhost SECRETSTORE_TOKENFILE: $SNAP_DATA/secrets/security-bootstrapper-redis/secrets-token.json DATABASECONFIG_PATH: $SNAP_DATA/redis/conf @@ -148,7 +148,7 @@ apps: command-chain: - bin/source-env-file.sh environment: - ENV_FILE: $SNAP_DATA/config/security-bootstrapper/res/security-bootstrapper.env + ENV_FILE: $SNAP_DATA/config/security-bootstrapper/overrides.env STAGEGATE_REGISTRY_HOST: localhost STAGEGATE_REGISTRY_ACL_BOOTSTRAPTOKENPATH: $SNAP_DATA/secrets/consul-acl-token/bootstrap_token.json STAGEGATE_REGISTRY_ACL_MANAGEMENTTOKENPATH: $SNAP_DATA/secrets/consul-acl-token/mgmt_token.json