Skip to content

Commit

Permalink
jiaoben (#150)
Browse files Browse the repository at this point in the history
Signed-off-by: hanzhixiao <[email protected]>
  • Loading branch information
hanzhixiao authored Aug 18, 2023
1 parent 1aab4b4 commit 8377873
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/start_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ cd $SCRIPTS_ROOT

for ((i = 0; i < ${#service_filename[*]}; i++)); do
#Check whether the service exists
service_name="ps -aux|grep -w ${service_filename[$i]} |grep -v grep"
count="${service_name}| wc -l"

if [ $(eval ${count}) -gt 0 ]; then
pid="${service_name}| awk '{print \$2}'"
echo "${service_filename[$i]} service has been started,pid:$(eval $pid)"
echo "killing the service ${service_filename[$i]} pid:$(eval $pid)"
#kill the service that existed
kill -9 $(eval $pid)
sleep 0.5
fi
# service_name="ps |grep -w ${service_filename[$i]} |grep -v grep"
# count="${service_name}| wc -l"
#
# if [ $(eval ${count}) -gt 0 ]; then
# pid="${service_name}| awk '{print \$2}'"
# echo "${service_filename[$i]} service has been started,pid:$(eval $pid)"
# echo "killing the service ${service_filename[$i]} pid:$(eval $pid)"
# #kill the service that existed
# kill -9 $(eval $pid)
# sleep 0.5
# fi
cd $SCRIPTS_ROOT

#Get the rpc port in the configuration file
Expand Down

0 comments on commit 8377873

Please sign in to comment.