change send message by ws and optimization

This commit is contained in:
Gordon
2021-10-21 19:10:55 +08:00
parent c8155553b8
commit 098c7cfa9e
24 changed files with 603 additions and 227 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ rpc_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)
if [ $check -eq 1 ]; then
if [ $check -ge 1 ]; then
oldPid=$(ps aux | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
kill -9 $oldPid
fi
@@ -28,7 +28,7 @@ done
sleep 3
#Check launched service process
check=$(ps aux | grep -w ./${push_name} | grep -v grep | wc -l)
if [ $check -eq 1 ]; then
if [ $check -ge 1 ]; then
newPid=$(ps aux | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
ports=$(netstat -netulp | grep -w ${newPid} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
allPorts=""