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
+6 -6
View File
@@ -37,12 +37,12 @@ prome_ports=($ports_array)
#Check if the service exists
#If it is exists,kill this process
check=`ps | grep -w ./${openim_msgtransfer} | grep -v grep| wc -l`
if [ $check -ge 1 ]
then
oldPid=`ps | grep -w ./${openim_msgtransfer} | grep -v grep|awk '{print $2}'`
kill -9 $oldPid
fi
#check=`ps | grep -w ./${openim_msgtransfer} | grep -v grep| wc -l`
#if [ $check -ge 1 ]
#then
#oldPid=`ps | grep -w ./${openim_msgtransfer} | grep -v grep|awk '{print $2}'`
# kill -9 $oldPid
#fi
#Waiting port recycling
sleep 1