Commit 9be3fbe3 authored by nanahira's avatar nanahira

run once after

parent 277bacd4
Pipeline #1933 passed with stage
in 3 minutes and 13 seconds
......@@ -3,10 +3,7 @@
# ROUTE_PLANS
source /usr/src/app/route-plans
while read dst others
do
if [[ "$dst" == "10.198.0."* ]] && [[ "$others" == *"proto $TARGET_PROTOCOL"* ]]
then
_calculate_route() {
# 读 babeld 路由
declare -A routes
while read -r dst others
......@@ -39,5 +36,14 @@ do
echo "route replace default dev $best_dev table $table"
fi
done | ip -batch -
}
_calculate_route
while read dst others
do
if [[ "$dst" == "10.198.0."* ]] && [[ "$others" == *"proto $TARGET_PROTOCOL"* ]]
then
_calculate_route
fi
done < <( ip monitor route )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment