57068368 发表于 2020-5-1 17:00:34

帮忙解读一下脚本每行的意思。

:local rmark "tr069ip"
:local count [ /ip route print count-only where comment="tr069ip"]
if ($bound=1) do={
:if ($count = 0) do={ /ip route add gateway=$"gateway-address" comment="tr069ip" routing-mark=$rmark} else=
:if ($count = 1) do={
:local test
:if ( != "gateway-address") do={ /ip route set $test gateway= $"gateway-address"
}} else={
:error "Multiple routes found"
}
}
} else={
/ip route remove }


页: [1]
查看完整版本: 帮忙解读一下脚本每行的意思。