From 750db7a01cb7cb5009dbf02ac5fcdde95e021298 Mon Sep 17 00:00:00 2001 From: gberl002 Date: Wed, 17 May 2023 14:46:24 -0400 Subject: [PATCH] Fixed addRouter type and added attribute option Signed-off-by: gberl002 --- quickstart/docker/image/ziti-cli-functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quickstart/docker/image/ziti-cli-functions.sh b/quickstart/docker/image/ziti-cli-functions.sh index 375c402cf..5361da7ed 100644 --- a/quickstart/docker/image/ziti-cli-functions.sh +++ b/quickstart/docker/image/ziti-cli-functions.sh @@ -877,7 +877,7 @@ function _create_router_config { # Used to create a router, router config, then enroll the router. function addRouter { - local router_name router_type retVal + local router_name router_type retVal router_attr # Make sure necessary env variables are set _check_env_variable ZITI_HOME ZITI_BIN_DIR ZITI_USER ZITI_PWD retVal=$? @@ -887,6 +887,7 @@ function addRouter { # Allow router name and type to be passed in as arg router_name="${1-}" router_type="${2-}" + router_attr="${3-}" # If no router name provided and env var is not set, prompt user for a router name if [[ "${router_name}" == "" ]] && [[ -z "${ZITI_EDGE_ROUTER_NAME}" ]]; then echo -e "$(YELLOW "addRouter requires a router name to be supplied") " @@ -906,7 +907,7 @@ function addRouter { # Create router zitiLogin "${ZITI_BIN_DIR-}/ziti" edge delete edge-router "${router_name}" - "${ZITI_BIN_DIR-}/ziti" edge create edge-router "${router_name}" -o "${ZITI_HOME}/${router_name}.jwt" -t -a "${router_type}" + "${ZITI_BIN_DIR-}/ziti" edge create edge-router "${router_name}" -o "${ZITI_HOME}/${router_name}.jwt" -t -a "${router_attr}" # Create router config _create_router_config "${router_name}" "${router_type}"