Merge branch 'main' into v0926_project_layout

# Conflicts:
#	cmd/open_im_api/main.go
#	internal/rpc/auth/rpcAuth.go
#	internal/rpc/chat/rpcChat.go
#	src/common/log/logrus.go
This commit is contained in:
xmcy0011
2021-10-11 22:50:24 +08:00
22 changed files with 83 additions and 67 deletions
+2 -4
View File
@@ -4,9 +4,7 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
service_port_name=(
#api port name
openImApiPort
#rpc port name
openImUserPort
openImFriendPort
openImOfflineMessagePort
@@ -14,8 +12,8 @@ service_port_name=(
openImGroupPort
openImAuthPort
openImPushPort
websocketPort
sdkWsPort
openImWsPort
openImSdkWsPort
)
for i in ${service_port_name[*]};do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
+1
View File
@@ -8,6 +8,7 @@ need_to_start_server_shell=(
msg_gateway_start.sh
push_start.sh
msg_transfer_start.sh
sdk_svr_start.sh
)
#fixme The 10 second delay to start the project is for the docker-compose one-click to start openIM when the infrastructure dependencies are not started
+3 -3
View File
@@ -4,7 +4,7 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
list1=$(cat $config_path | grep openImOnlineRelayPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep websocketPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
list_to_string $list1
rpc_ports=($ports_array)
list_to_string $list2
@@ -26,7 +26,7 @@ fi
sleep 1
cd ${msg_gateway_binary_root}
for ((i = 0; i < ${#ws_ports[@]}; i++)); do
nohup ./${msg_gateway_name} -rpc_port ${rpc_ports[$i]} -ws_port ${ws_ports[$i]} >>../logs/${msg_gateway_name}.log 2>&1 &
nohup ./${msg_gateway_name} -rpc_port ${rpc_ports[$i]} -ws_port ${ws_ports[$i]} >>../logs/openIM.log 2>&1 &
done
#Check launched service process
@@ -39,7 +39,7 @@ if [ $check -ge 1 ]; then
ports=$(netstat -netulp | grep -w ${i} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
allPorts=${allPorts}"$ports "
done
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${msg_gateway_name}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allNewPid}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}
+2 -2
View File
@@ -16,7 +16,7 @@ fi
#Waiting port recycling
sleep 1
cd ${msg_transfer_binary_root}
nohup ./${msg_transfer_name} >>../logs/${msg_transfer_name}.log 2>&1 &
nohup ./${msg_transfer_name} >>../logs/openIM.log 2>&1 &
#Check launched service process
check=`ps aux | grep -w ./${msg_transfer_name} | grep -v grep| wc -l`
if [ $check -eq 1 ]
@@ -29,7 +29,7 @@ for i in $ports ;
do
allPorts=${allPorts}"$i "
done
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS "${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${msg_transfer_name}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${newPid}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}
+2 -2
View File
@@ -22,7 +22,7 @@ sleep 1
cd ${push_binary_root}
for ((i = 0; i < ${#rpc_ports[@]}; i++)); do
nohup ./${push_name} -port ${rpc_ports[$i]} >>../logs/${push_name}.log 2>&1 &
nohup ./${push_name} -port ${rpc_ports[$i]} >>../logs/openIM.log 2>&1 &
done
sleep 3
@@ -36,7 +36,7 @@ if [ $check -eq 1 ]; then
for i in $ports; do
allPorts=${allPorts}"$i "
done
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS "${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${push_name}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${newPid}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}
@@ -4,8 +4,8 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
list1=$(cat $config_path | grep openImApiPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep websocketPort | awk -F '[:]' '{print $NF}')
list3=$(cat $config_path | grep sdkWsPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
list3=$(cat $config_path | grep openImSdkWsPort | awk -F '[:]' '{print $NF}')
list_to_string $list1
api_ports=($ports_array)
list_to_string $list2
@@ -26,7 +26,7 @@ fi
#Waiting port recycling
sleep 1
cd ${sdk_server_binary_root}
nohup ./${sdk_server_name} -openIM_api_port ${api_ports[0]} -openIM_ws_port ${ws_ports[0]} -sdk_ws_port ${sdk_ws_ports[0]} >>../logs/${sdk_server_name}.log 2>&1 &
nohup ./${sdk_server_name} -openIM_api_port ${api_ports[0]} -openIM_ws_port ${ws_ports[0]} -sdk_ws_port ${sdk_ws_ports[0]} >>../logs/openIM.log 2>&1 &
#Check launched service process
sleep 3
+1 -1
View File
@@ -8,7 +8,7 @@ need_to_start_server_shell=(
msg_gateway_start.sh
push_start.sh
msg_transfer_start.sh
start_sdk_svr.sh
sdk_svr_start.sh
)
for i in ${need_to_start_server_shell[*]}; do