mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-18 07:49:01 +08:00
bug fix and shell optimization
This commit is contained in:
@@ -4,6 +4,8 @@ source ./style_info.cfg
|
||||
source ./path_info.cfg
|
||||
source ./function.sh
|
||||
|
||||
|
||||
|
||||
list1=$(cat $config_path | grep openImPushPort | awk -F '[:]' '{print $NF}')
|
||||
list_to_string $list1
|
||||
rpc_ports=($ports_array)
|
||||
@@ -23,11 +25,12 @@ for ((i = 0; i < ${#rpc_ports[@]}; i++)); do
|
||||
nohup ./${push_name} -port ${rpc_ports[$i]} >>../logs/${push_name}.log 2>&1 &
|
||||
done
|
||||
|
||||
sleep 1
|
||||
#Check launched service process
|
||||
check=$(ps aux | grep -w ./${push_name} | grep -v grep | wc -l)
|
||||
if [ $check -eq 1 ]; then
|
||||
newPid=$(ps aux | grep -w ./${push_name} | grep -v grep | awk '{print $2}')
|
||||
ports=$(netstat -netulp | grep ${newPid} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
|
||||
ports=$(netstat -netulp | grep -w ${newPid} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
|
||||
allPorts=""
|
||||
|
||||
for i in $ports; do
|
||||
|
||||
Reference in New Issue
Block a user