diff --git a/docker/staging_pull_compose.template.yaml b/docker/staging_pull_compose.template.yaml index 8172ea8f..27ac061d 100644 --- a/docker/staging_pull_compose.template.yaml +++ b/docker/staging_pull_compose.template.yaml @@ -277,14 +277,14 @@ services: # Function to create or update OAuth2 client (Idempotency) upsert_client() { - ID=$1 + ID=$$1 shift - if hydra get oauth2-client --endpoint http://hydra:4445 "$ID" >/dev/null 2>&1; then - echo "Updating existing client: $ID" - hydra update oauth2-client --endpoint http://hydra:4445 "$ID" "$@" + if hydra get oauth2-client --endpoint http://hydra:4445 "$$ID" >/dev/null 2>&1; then + echo "Updating existing client: $$ID" + hydra update oauth2-client --endpoint http://hydra:4445 "$$ID" "$$@" else - echo "Creating new client: $ID" - hydra create oauth2-client --endpoint http://hydra:4445 --id "$ID" "$@" + echo "Creating new client: $$ID" + hydra create oauth2-client --endpoint http://hydra:4445 --id "$$ID" "$$@" fi }