feat: support registration_token in JSON config
Can now pass registration_token directly in JSON instead of requiring SYSADMIN_REGISTRATION_TOKEN environment variable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
850a46e5ea
commit
f935f7057a
|
|
@ -31,7 +31,8 @@
|
||||||
# "skip_ssl": false,
|
# "skip_ssl": false,
|
||||||
# "customer": "acme",
|
# "customer": "acme",
|
||||||
# "domain": "acme.com",
|
# "domain": "acme.com",
|
||||||
# "company_name": "Acme Corp"
|
# "company_name": "Acme Corp",
|
||||||
|
# "registration_token": "uuid-from-orchestrator"
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
@ -134,6 +135,10 @@ parse_json() {
|
||||||
COMPANY_NAME=$(echo "$json" | jq -r '.company_name // empty')
|
COMPANY_NAME=$(echo "$json" | jq -r '.company_name // empty')
|
||||||
DOCKER_USER=$(echo "$json" | jq -r '.docker_user // empty')
|
DOCKER_USER=$(echo "$json" | jq -r '.docker_user // empty')
|
||||||
DOCKER_TOKEN=$(echo "$json" | jq -r '.docker_token // empty')
|
DOCKER_TOKEN=$(echo "$json" | jq -r '.docker_token // empty')
|
||||||
|
|
||||||
|
# Registration token (can also be set via environment variable)
|
||||||
|
local json_token=$(echo "$json" | jq -r '.registration_token // empty')
|
||||||
|
[[ -n "$json_token" ]] && SYSADMIN_REGISTRATION_TOKEN="$json_token"
|
||||||
}
|
}
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue