|
|
|
@ -95,21 +95,24 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
|
|
|
|
|
|
|
|
|
portList2=$(cat $config_path | grep ${service_prometheus_port_name[$i]} | awk -F '[:]' '{print $NF}')
|
|
|
|
|
list_to_string $portList2
|
|
|
|
|
echo -e "debug========>cmd=$cmd AAAAA"
|
|
|
|
|
prome_ports=($ports_array)
|
|
|
|
|
#Start related rpc services based on the number of ports
|
|
|
|
|
for ((j = 0; j < ${#service_ports[*]}; j++)); do
|
|
|
|
|
#Start the service in the background
|
|
|
|
|
if [ -z "${prome_ports[$j]}" ]; then
|
|
|
|
|
cmd="./${service_filename[$i]} --port ${service_ports[$j]}"
|
|
|
|
|
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --config_folder_path ${configfile_path}"
|
|
|
|
|
else
|
|
|
|
|
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --prometheus_port ${prome_ports[$j]}"
|
|
|
|
|
cmd="./${service_filename[$i]} --port ${service_ports[$j]} --prometheus_port ${prome_ports[$j]} --config_folder_path ${configfile_path}"
|
|
|
|
|
fi
|
|
|
|
|
if [ $i -eq 0 -o $i -eq 1 ]; then
|
|
|
|
|
cmd="./${service_filename[$i]} --port ${service_ports[$j]}"
|
|
|
|
|
fi
|
|
|
|
|
echo $cmd
|
|
|
|
|
echo -e "debug========>cmd=$cmd"
|
|
|
|
|
echo "=====================start ${service_filename[$i]}======================">>$OPENIM_ROOT/logs/openIM.log
|
|
|
|
|
nohup $cmd >>$OPENIM_ROOT/logs/openIM.log 2>&1 &
|
|
|
|
|
echo -e "debug========>OpenIMROOT=$OPENIM_ROOT"
|
|
|
|
|
sleep 1
|
|
|
|
|
pid="netstat -ntlp|grep $j |awk '{printf \$7}'|cut -d/ -f1"
|
|
|
|
|
echo -e "${GREEN_PREFIX}${service_filename[$i]} start success,port number:${service_ports[$j]} pid:$(eval $pid)$COLOR_SUFFIX"
|
|
|
|
|