diff --git a/script/msg_transfer_start.sh b/script/msg_transfer_start.sh index b54513999..8a66ec35e 100755 --- a/script/msg_transfer_start.sh +++ b/script/msg_transfer_start.sh @@ -22,7 +22,12 @@ sleep 1 cd ${msg_transfer_binary_root} for ((i = 0; i < ${msg_transfer_service_num}; i++)); do - nohup ./${msg_transfer_name} -prometheus_port ${prome_ports[$i]} >>../logs/openIM.log 2>&1 & + prome_port=${prome_ports[$i]} + cmd="nohup ./${msg_transfer_name}" + if [ $prome_port != "" ]; then + cmd=$cmd+" -prometheus_port $prome_port" + fi + $cmd >>../logs/openIM.log 2>&1 & done #Check launched service process diff --git a/script/start_rpc_service.sh b/script/start_rpc_service.sh index bb53a85b6..8abfde5ed 100644 --- a/script/start_rpc_service.sh +++ b/script/start_rpc_service.sh @@ -80,10 +80,8 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do list_to_string $portList2 prome_ports=($ports_array) #Start related rpc services based on the number of ports - # for j in ${service_ports}; do for ((j = 0; j < ${#service_ports[*]}; j++)); do #Start the service in the background - # ./${service_filename[$i]} -port $j & cmd="./${service_filename[$i]} -port ${service_ports[$j]} -prometheus_port ${prome_ports[$j]}" if [ $i -eq 0 -o $i -eq 1 ]; then cmd="./${service_filename[$i]} -port ${service_ports[$j]}"