fix: start don't kill old process

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
This commit is contained in:
Gordon
2023-08-17 21:19:04 +08:00
parent dc419794e7
commit ac7e909463
5 changed files with 29 additions and 29 deletions
+5 -5
View File
@@ -50,11 +50,11 @@ if [ ${#rpc_ports[@]} -ne ${#ws_ports[@]} ]; then
fi
#Check if the service exists
#If it is exists,kill this process
check=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | wc -l)
if [ $check -ge 1 ]; then
oldPid=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | awk '{print $2}')
kill -9 ${oldPid}
fi
#check=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | wc -l)
#if [ $check -ge 1 ]; then
# oldPid=$(ps aux | grep -w ./${openim_msggateway} | grep -v grep | awk '{print $2}')
# kill -9 ${oldPid}
#fi
#Waiting port recycling
sleep 1
cd ${msg_gateway_binary_root}