if grep-q"INFO:ELASTIC:ready with hosts" log_1.log;then
echo"run node 1 ok"
break
else
sleep 1
fi
if[$i-eq 10 ];then
echo"run node 1 error"
exit-1
fi
done
lw0="log/workerlog.0"
check_env(){
sleep 3
if grep-q"0-PADDLE_TRAINERS=$PADDLE_TRAINERS"$lw0&&grep-q"1-PADDLE_TRAINERS=$PADDLE_TRAINERS"$lw0;then
echo"PADDLE_TRAINERS ok"
else
echo"PADDLE_TRAINERS error"
exit-1
fi
if grep-q"0-DISTRIBUTED_TRAINER_ENDPOINTS=$DISTRIBUTED_TRAINER_ENDPOINTS"$lw0&&grep-q"1-DISTRIBUTED_TRAINER_ENDPOINTS=$DISTRIBUTED_TRAINER_ENDPOINTS"$lw0;then