script update

pull/4/head
away 4 years ago
parent 7772b9ff88
commit 8b04929f3d

@ -26,7 +26,7 @@ fi
sleep 3
cd ${msg_gateway_binary_root}
for ((i = 0; i < ${#ws_ports[@]}; i++)); do
nohup ./${msg_gateway_name} -rpc_port ${rpc_ports[$i]} -ws_port ${ws_ports[$i]} >>../logs/${msg_gateway_name}.$(date +%Y-%m-%d).log 2>&1 &
nohup ./${msg_gateway_name} -rpc_port ${rpc_ports[$i]} -ws_port ${ws_ports[$i]} >>../logs/${msg_gateway_name}.log 2>&1 &
done
#Check launched service process

@ -16,7 +16,7 @@ fi
#Waiting port recycling
sleep 1
cd ${msg_transfer_binary_root}
nohup ./${msg_transfer_name} >>../logs/${msg_transfer_name}.`date +%Y-%m-%d`.log 2>&1 &
nohup ./${msg_transfer_name} >>../logs/${msg_transfer_name}.log 2>&1 &
#Check launched service process
check=`ps aux | grep -w ./${msg_transfer_name} | grep -v grep| wc -l`
if [ $check -eq 1 ]

@ -22,7 +22,7 @@ sleep 1
cd ${push_binary_root}
for ((i = 0; i < ${#rpc_ports[@]}; i++)); do
nohup ./${push_name} -port ${rpc_ports[$i]} >>../logs/${push_name}.$(date +%Y-%m-%d).log 2>&1 &
nohup ./${push_name} -port ${rpc_ports[$i]} >>../logs/${push_name}.log 2>&1 &
done

@ -10,10 +10,14 @@ need_to_start_server_shell=(
msg_transfer_start.sh
)
#fixme The 10 second delay to start the project is for the docker-compose one-click to start openIM when the infrastructure dependencies are not started
sleep 10
for i in ${need_to_start_server_shell[*]}; do
chmod +x $i
./$i
done
#fixme The infinite loop prevents the ope IM service from exiting after execution in the docker container
while [ true ]; do
sleep 60
done

@ -51,7 +51,7 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
echo -e "${SKY_BLUE_PREFIX}${service_filename[$i]} Service is starting,port number:$j $COLOR_SUFFIX"
#Start the service in the background
# ./${service_filename[$i]} -port $j &
nohup ./${service_filename[$i]} -port $j >../logs/openIM.log 2>&1 &
nohup ./${service_filename[$i]} -port $j >>../logs/openIM.log 2>&1 &
sleep 1
pid="netstat -ntlp|grep $j |awk '{printf \$7}'|cut -d/ -f1"
echo -e "${RED_PREFIX}${service_filename[$i]} Service is started,port number:$j pid:$(eval $pid)$COLOR_SUFFIX"

Loading…
Cancel
Save