add open-im web svr

This commit is contained in:
Gordon
2021-09-27 21:03:36 +08:00
parent ab84a42f98
commit e6419599c8
15 changed files with 488 additions and 540 deletions
+14 -14
View File
@@ -15,19 +15,19 @@ service_port_name=(
openImAuthPort
openImPushPort
websocketPort
sdkWsPort
)
for i in ${service_port_name[*]}; do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
list_to_string $list
for j in ${ports_array}; do
port=$(netstat -netulp | grep ./open_im | awk '{print $4}' | grep -w ${j} | awk -F '[:]' '{print $NF}')
if [[ ${port} -ne ${j} ]]; then
echo -e ${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${YELLOW_PREFIX}${j}${COLOR_SUFFIX}
exit 1
else
echo -e ${j}${GREEN_PREFIX}" port has been listening,belongs service is "${i}${COLOR_SUFFIX}
fi
for i in ${service_port_name[*]};do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
list_to_string $list
for j in ${ports_array};do
port=`netstat -netulp |grep ./open_im| awk '{print $4}'|grep -w ${j}|awk -F '[:]' '{print $NF}'`
if [[ ${port} -ne ${j} ]]; then
echo -e ${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${YELLOW_PREFIX}${j}${COLOR_SUFFIX}
exit 1
else
echo -e ${j}${GREEN_PREFIX}" port has been listening,belongs service is "${i}${COLOR_SUFFIX}
fi
done
done
done
echo -e ${YELLOW_PREFIX}"all service launch success"${COLOR_SUFFIX}
echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}