From 1e439538874a58c2beb44dc7f67781cd7f35904e Mon Sep 17 00:00:00 2001 From: hashfyre Date: Wed, 10 Jan 2018 17:30:40 +0530 Subject: [PATCH] script: ucase cluster --- update.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index b4be9d6..6d06a96 100755 --- a/update.sh +++ b/update.sh @@ -12,13 +12,16 @@ fi # check required params if [ ! -z ${PLUGIN_CLUSTER} ]; then - CLUSTER=${PLUGIN_CLUSTER} + # convert cluster name to ucase and assign + CLUSTER=${PLUGIN_CLUSTER^^} + # create dynamic cert var names SERVER_URL_VAR=SERVER_URL_${CLUSTER} SERVER_CERT_VAR=SERVER_CERT_${CLUSTER} CLIENT_CERT_VAR=CLIENT_CERT_${CLUSTER} CLIENT_KEY_VAR=CLIENT_KEY_${CLUSTER} + # expand the var contents SERVER_URL=${!SERVER_URL_VAR} SERVER_CERT=${!SERVER_CERT_VAR} CLIENT_CERT=${!CLIENT_CERT_VAR}