mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
netwatch-notify: check one after another
This can bring an extra delay, but saves a check in most cases.
This commit is contained in:
parent
4869d74edf
commit
64aa6ef124
|
@ -60,10 +60,13 @@
|
|||
|
||||
:local FwAddrList ($0 . "-" . [ $GetRandom20CharAlNum ]);
|
||||
/ip/firewall/address-list/add address=$Name list=$FwAddrList dynamic=yes timeout=1s;
|
||||
:delay 20ms;
|
||||
:if ([ :len [ /ip/firewall/address-list/find where list=$FwAddrList address=$Expected ] ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
/ipv6/firewall/address-list/add address=$Name list=$FwAddrList dynamic=yes timeout=1s;
|
||||
:delay 20ms;
|
||||
:if ([ :len [ /ip/firewall/address-list/find where list=$FwAddrList address=$Expected ] ] > 0 || \
|
||||
[ :len [ /ipv6/firewall/address-list/find where list=$FwAddrList address=$Expected ] ] > 0) do={
|
||||
:if ([ :len [ /ipv6/firewall/address-list/find where list=$FwAddrList address=$Expected ] ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue