From 77d49e2848b1467b6d78c7abb42e52dfcc18c17c Mon Sep 17 00:00:00 2001 From: Matthew White Date: Tue, 17 Dec 2024 15:35:13 -0500 Subject: [PATCH] Add Central version to client-config.json --- files/nginx/client-config.json.template | 1 + files/nginx/setup-odk.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/files/nginx/client-config.json.template b/files/nginx/client-config.json.template index 3387eef3..a18adf52 100644 --- a/files/nginx/client-config.json.template +++ b/files/nginx/client-config.json.template @@ -1,3 +1,4 @@ { + "centralVersion": "$CENTRAL_VERSION", "oidcEnabled": $OIDC_ENABLED } diff --git a/files/nginx/setup-odk.sh b/files/nginx/setup-odk.sh index 87416c4b..bc947b70 100644 --- a/files/nginx/setup-odk.sh +++ b/files/nginx/setup-odk.sh @@ -7,6 +7,8 @@ if [[ $OIDC_ENABLED != 'true' ]] && [[ $OIDC_ENABLED != 'false' ]]; then exit 1 fi +CENTRAL_VERSION=$(cat /usr/share/nginx/html/version.txt) +export CENTRAL_VERSION envsubst < /usr/share/odk/nginx/client-config.json.template > /usr/share/nginx/html/client-config.json # Generate self-signed keys for the incorrect (catch-all) HTTPS listener. This