fix: docker release v3.1.1 images optimize

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-08-04 15:23:29 +08:00
parent 22c8cd7fdb
commit 8c55ad1f02
10 changed files with 35 additions and 35 deletions
+4 -4
View File
@@ -45,9 +45,9 @@ prome_ports=($ports_array)
#Check if the service exists
#If it is exists,kill this process
check=$(ps aux | 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
oldPid=$(ps aux | 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
fi
#Waiting port recycling
@@ -61,9 +61,9 @@ done
sleep 3
#Check launched service process
check=$(ps aux | 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
newPid=$(ps aux | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
newPid=$(ps | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
ports=$(netstat -netulp | grep -w ${newPid} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
allPorts=""