mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
feat: use robot to migrate code
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
This commit is contained in:
+11
-23
@@ -6,9 +6,7 @@ source ./function.sh
|
||||
service_port_name=(
|
||||
openImWsPort
|
||||
openImApiPort
|
||||
openImSdkWsPort
|
||||
openImDemoPort
|
||||
openImCmsApiPort
|
||||
#openImSdkWsPort
|
||||
openImUserPort
|
||||
openImFriendPort
|
||||
openImMessagePort
|
||||
@@ -16,24 +14,14 @@ service_port_name=(
|
||||
openImGroupPort
|
||||
openImAuthPort
|
||||
openImPushPort
|
||||
openImStatisticsPort
|
||||
openImMessageCmsPort
|
||||
openImAdminCmsPort
|
||||
openImOfficePort
|
||||
openImOrganizationPort
|
||||
openImConversationPort
|
||||
openImThirdPort
|
||||
)
|
||||
switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
|
||||
for i in ${service_port_name[*]}; do
|
||||
if [ ${switch} != "true" ]; then
|
||||
if [ ${i} == "openImDemoPort" ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
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}')
|
||||
port=$(ss -tunlp| grep open_im | awk '{print $5}' | 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}
|
||||
echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
|
||||
@@ -55,13 +43,13 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#check=$(ps aux | grep -w ./${timer_task_name} | grep -v grep | wc -l)
|
||||
#if [ $check -ge 1 ]; then
|
||||
# echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImMsgTimer"${COLOR_SUFFIX}
|
||||
#else
|
||||
# echo -e ${RED_PREFIX}"openImMsgTimer service does not start normally"${COLOR_SUFFIX}
|
||||
# echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
|
||||
# exit -1
|
||||
#fi
|
||||
check=$(ps aux | grep -w ./${cron_task_name} | grep -v grep | wc -l)
|
||||
if [ $check -ge 1 ]; then
|
||||
echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImCronTask"${COLOR_SUFFIX}
|
||||
else
|
||||
echo -e ${RED_PREFIX}"cron_task_name service does not start normally"${COLOR_SUFFIX}
|
||||
echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
|
||||
exit -1
|
||||
fi
|
||||
|
||||
echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
|
||||
|
||||
Reference in New Issue
Block a user