From cd58e05d90fec80759608f281bffcbfca530ff93 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Mon, 2 Mar 2020 09:18:18 -0800 Subject: [PATCH] Fixes string replacement for api service names with multiple slashes. See https://github.com/bcgov/TheOrgBook/pull/867 Signed-off-by: Wade Barnes --- images/nginx-runtime/docker/s2i/bin/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/nginx-runtime/docker/s2i/bin/run b/images/nginx-runtime/docker/s2i/bin/run index 8accb13..7d04c17 100644 --- a/images/nginx-runtime/docker/s2i/bin/run +++ b/images/nginx-runtime/docker/s2i/bin/run @@ -64,7 +64,7 @@ getApiUrl (){ # Results in API_URL=https://django-devex-von-dev.pathfinder.gov.bc.ca/api/v1/ # ================================================================================ if [ ! -z "${API_SERVICE_NAME}" ]; then - _SERVICE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${API_SERVICE_NAME/-/_})" + _SERVICE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${API_SERVICE_NAME//-/_})" _SERVICE_HOST_NAME=${_SERVICE_NAME}_SERVICE_HOST _SERVICE_PORT_NAME=${_SERVICE_NAME}_SERVICE_PORT