Skip to content

Commit

Permalink
feat:check and build binary if needed when make start
Browse files Browse the repository at this point in the history
  • Loading branch information
CNCSMonster committed Oct 10, 2023
1 parent c1fd5b4 commit 29910a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/start_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,14 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
list_to_string ${portList}
service_ports=($ports_array)


#Start related rpc services based on the number of ports
for ((j = 0; j < ${#service_ports[*]}; j++)); do
if [ ! -e "$bin_dir/${service_filename[$i]}" ]; then
echo -e ${RED_PREFIX}"Error: ${service_filename[$i]} does not exist,Start fail!"${COLOR_SUFFIX}
echo "start build these binary"
"./build_all_service.sh"
fi
#Start the service in the background
cmd="$bin_dir/${service_filename[$i]} -port ${service_ports[$j]} --config_folder_path ${config_path}"
if [ $i -eq 0 -o $i -eq 1 ]; then
Expand All @@ -102,4 +108,4 @@ for ((i = 0; i < ${#service_filename[*]}; i++)); do
# pid="netstat -ntlp|grep $j |awk '{printf \$7}'|cut -d/ -f1"
# echo -e "${GREEN_PREFIX}${service_filename[$i]} start success,port number:${service_ports[$j]} pid:$(eval $pid)$COLOR_SUFFIX"
done
done
done

0 comments on commit 29910a4

Please sign in to comment.