mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-09-29 10:59:59 +08:00
fix: start don't kill old process (#892)
* fix: to start im or chat, ZooKeeper must be started first. * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: go mod update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: get all userID Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: msggateway add online status call Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * refactor: log change Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * refactor: log change Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * chore: network mode change Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * cicd: robot automated Change Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * cicd: robot automated Change Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * cicd: robot automated Change Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat: add api of get server time Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * feat: remove go work sum Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * cicd: robot automated Change Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: pull message add isRead field Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: check msg-transfer script Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: script update Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: start don't kill old process Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> --------- Signed-off-by: Gordon <1432970085@qq.com> Signed-off-by: withchao <993506633@qq.com> Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: withchao <993506633@qq.com> Co-authored-by: Xinwei Xiong <3293172751NSS@gmail.com> Co-authored-by: FGadvancer <FGadvancer@users.noreply.github.com>
This commit is contained in:
parent
4f1dacabfa
commit
958afd6115
@ -50,11 +50,11 @@ if [ ${#rpc_ports[@]} -ne ${#ws_ports[@]} ]; then
|
|||||||
fi
|
fi
|
||||||
#Check if the service exists
|
#Check if the service exists
|
||||||
#If it is exists,kill this process
|
#If it is exists,kill this process
|
||||||
check=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | wc -l)
|
#check=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | wc -l)
|
||||||
if [ $check -ge 1 ]; then
|
#if [ $check -ge 1 ]; then
|
||||||
oldPid=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | awk '{print $2}')
|
# oldPid=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | awk '{print $2}')
|
||||||
kill -9 ${oldPid}
|
# kill -9 ${oldPid}
|
||||||
fi
|
#fi
|
||||||
#Waiting port recycling
|
#Waiting port recycling
|
||||||
sleep 1
|
sleep 1
|
||||||
cd ${msg_gateway_binary_root}
|
cd ${msg_gateway_binary_root}
|
||||||
|
@ -37,12 +37,12 @@ prome_ports=($ports_array)
|
|||||||
|
|
||||||
#Check if the service exists
|
#Check if the service exists
|
||||||
#If it is exists,kill this process
|
#If it is exists,kill this process
|
||||||
check=`ps | grep -w ./${openim_msgtransfer} | grep -v grep| wc -l`
|
#check=`ps | grep -w ./${openim_msgtransfer} | grep -v grep| wc -l`
|
||||||
if [ $check -ge 1 ]
|
#if [ $check -ge 1 ]
|
||||||
then
|
#then
|
||||||
oldPid=`ps | grep -w ./${openim_msgtransfer} | grep -v grep|awk '{print $2}'`
|
#oldPid=`ps | grep -w ./${openim_msgtransfer} | grep -v grep|awk '{print $2}'`
|
||||||
kill -9 $oldPid
|
# kill -9 $oldPid
|
||||||
fi
|
#fi
|
||||||
#Waiting port recycling
|
#Waiting port recycling
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@ prome_ports=($ports_array)
|
|||||||
|
|
||||||
#Check if the service exists
|
#Check if the service exists
|
||||||
#If it is exists,kill this process
|
#If it is exists,kill this process
|
||||||
check=$(ps | grep -w ./${push_name} | grep -v grep | wc -l)
|
#check=$(ps | grep -w ./${push_name} | grep -v grep | wc -l)
|
||||||
if [ $check -ge 1 ]; then
|
#if [ $check -ge 1 ]; then
|
||||||
oldPid=$(ps | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
|
# oldPid=$(ps | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
|
||||||
kill -9 $oldPid
|
# kill -9 $oldPid
|
||||||
fi
|
#fi
|
||||||
#Waiting port recycling
|
#Waiting port recycling
|
||||||
sleep 1
|
sleep 1
|
||||||
cd ${push_binary_root}
|
cd ${push_binary_root}
|
||||||
|
@ -35,11 +35,11 @@ logs_dir="$OPENIM_ROOT/logs"
|
|||||||
#Check if the service exists
|
#Check if the service exists
|
||||||
#If it is exists,kill this process
|
#If it is exists,kill this process
|
||||||
check=`ps | grep -w ./${cron_task_name} | grep -v grep| wc -l`
|
check=`ps | grep -w ./${cron_task_name} | grep -v grep| wc -l`
|
||||||
if [ $check -ge 1 ]
|
#if [ $check -ge 1 ]
|
||||||
then
|
#then
|
||||||
oldPid=`ps | grep -w ./${cron_task_name} | grep -v grep|awk '{print $2}'`
|
#oldPid=`ps | grep -w ./${cron_task_name} | grep -v grep|awk '{print $2}'`
|
||||||
kill -9 $oldPid
|
# kill -9 $oldPid
|
||||||
fi
|
#fi
|
||||||
#Waiting port recycling
|
#Waiting port recycling
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
@ -78,14 +78,14 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
|||||||
service_name="ps |grep -w ${service_filename[$i]} |grep -v grep"
|
service_name="ps |grep -w ${service_filename[$i]} |grep -v grep"
|
||||||
count="${service_name}| wc -l"
|
count="${service_name}| wc -l"
|
||||||
|
|
||||||
if [ $(eval ${count}) -gt 0 ]; then
|
# if [ $(eval ${count}) -gt 0 ]; then
|
||||||
pid="${service_name}| awk '{print \$2}'"
|
# pid="${service_name}| awk '{print \$2}'"
|
||||||
echo "${service_filename[$i]} service has been started,pid:$(eval $pid)"
|
# echo "${service_filename[$i]} service has been started,pid:$(eval $pid)"
|
||||||
echo "killing the service ${service_filename[$i]} pid:$(eval $pid)"
|
# echo "killing the service ${service_filename[$i]} pid:$(eval $pid)"
|
||||||
#kill the service that existed
|
# #kill the service that existed
|
||||||
kill -9 $(eval $pid)
|
# kill -9 $(eval $pid)
|
||||||
sleep 0.5
|
# sleep 0.5
|
||||||
fi
|
# fi
|
||||||
cd $OPENIM_ROOT
|
cd $OPENIM_ROOT
|
||||||
cd $BIN_DIR
|
cd $BIN_DIR
|
||||||
# Get the rpc port in the configuration file
|
# Get the rpc port in the configuration file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user