mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
bug fix and shell optimization
This commit is contained in:
@@ -20,7 +20,7 @@ fi
|
||||
check=$(ps aux | grep -w ./${msg_gateway_name} | grep -v grep | wc -l)
|
||||
if [ $check -ge 1 ]; then
|
||||
oldPid=$(ps aux | grep -w ./${msg_gateway_name} | grep -v grep | awk '{print $2}')
|
||||
kill -9 ${oldPid}
|
||||
kill -9 ${oldPid}
|
||||
fi
|
||||
#Waiting port recycling
|
||||
sleep 3
|
||||
@@ -36,8 +36,8 @@ allPorts=""
|
||||
if [ $check -ge 1 ]; then
|
||||
allNewPid=$(ps aux | grep -w ./${msg_gateway_name} | grep -v grep | awk '{print $2}')
|
||||
for i in $allNewPid; do
|
||||
ports=$(netstat -netulp | grep ${i} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
|
||||
allPorts=${allPorts}"$ports "
|
||||
ports=$(netstat -netulp | grep -w ${i} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
|
||||
allPorts=${allPorts}"$ports "
|
||||
done
|
||||
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
|
||||
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${msg_gateway_name}${COLOR_SUFFIX}
|
||||
|
||||
Reference in New Issue
Block a user