From caae41500cae16898ea00e332f06c42baa75f74c Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Wed, 23 Aug 2023 21:02:49 +0800 Subject: [PATCH] feat: add more test code Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- scripts/install/openim-msggateway.sh | 6 +++--- scripts/install/openim-rpc.sh | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/install/openim-msggateway.sh b/scripts/install/openim-msggateway.sh index d31dc9612..3876ae523 100755 --- a/scripts/install/openim-msggateway.sh +++ b/scripts/install/openim-msggateway.sh @@ -34,15 +34,15 @@ function openim::msggateway::start() # OpenIM message gateway service port OPENIM_MESSAGE_GATEWAY_PORTS=$(openim::util::list-to-string ${OPENIM_MESSAGE_GATEWAY_PORT} ) - read -a OPENIM_MSGGATEWAY_PORTS_ARRAY <<< $(openim::util::list-to-string ${OPENIM_MESSAGE_GATEWAY_PORT} ) + read -a OPENIM_MSGGATEWAY_PORTS_ARRAY <<< ${OPENIM_MESSAGE_GATEWAY_PORTS} # OpenIM WS port OPENIM_WS_PORTS=$(openim::util::list-to-string ${OPENIM_WS_PORT} ) - read -a OPENIM_WS_PORTS_ARRAY <<< $(openim::util::list-to-string ${OPENIM_WS_PORT} ) + read -a OPENIM_WS_PORTS_ARRAY <<< ${OPENIM_WS_PORTS} # Message Gateway Prometheus port of the service MSG_GATEWAY_PROM_PORTS=$(openim::util::list-to-string ${MSG_GATEWAY_PROM_PORT} ) - read -a MSG_GATEWAY_PROM_PORTS_ARRAY <<< $(openim::util::list-to-string ${MSG_GATEWAY_PROM_PORT} ) + read -a MSG_GATEWAY_PROM_PORTS_ARRAY <<< ${MSG_GATEWAY_PROM_PORTS} openim::log::status "OpenIM Mssage Getway ports: ${OPENIM_MESSAGE_GATEWAY_PORTS[*]}" openim::log::status "OpenIM WS ports: ${OPENIM_WS_PORTS[*]}" diff --git a/scripts/install/openim-rpc.sh b/scripts/install/openim-rpc.sh index 5e77e149e..d66793b7e 100755 --- a/scripts/install/openim-rpc.sh +++ b/scripts/install/openim-rpc.sh @@ -127,8 +127,12 @@ function openim::rpc::start() { # Get the service and Prometheus ports. OPENIM_RPC_SERVICE_PORTS=( $(openim::util::list-to-string ${OPENIM_RPC_PORT_LISTARIES[$i]}) ) + read -a OPENIM_RPC_SERVICE_PORTS_ARRAY <<< ${OPENIM_RPC_SERVICE_PORTS} + OPENIM_RPC_PROM_PORTS=( $(openim::util::list-to-string ${OPENIM_RPC_PROM_PORT_LISTARIES[$i]}) ) - for ((j = 0; j < ${#OPENIM_RPC_SERVICE_PORTS[@]}; j++)); do + read -a OPENIM_RPC_PROM_PORTS_ARRAY <<< ${OPENIM_RPC_PROM_PORTS} + + for ((j = 0; j < ${#OPENIM_RPC_SERVICE_PORTS_ARRAY[@]}; j++)); do openim::log::info "Starting ${OPENIM_RPC_SERVICE_LISTARIES[$i]} service, port: ${OPENIM_RPC_SERVICE_PORTS[j]}, prometheus port: ${OPENIM_RPC_PROM_PORTS[j]}, binary root: ${OPENIM_OUTPUT_HOSTBIN}/${OPENIM_RPC_SERVICE_LISTARIES[$i]}" openim::rpc::start_service "${OPENIM_RPC_SERVICE_LISTARIES[$i]}" "${OPENIM_RPC_SERVICE_PORTS[j]}" "${OPENIM_RPC_PROM_PORTS[j]}" sleep 0.5