mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-21 00:19:32 +00:00
dhcp-to-dns: early exit with :exit
This commit is contained in:
parent
98f50ab293
commit
47cd3e0d6d
1 changed files with 2 additions and 4 deletions
|
|
@ -9,7 +9,6 @@
|
||||||
# check DHCP leases and add/remove/update DNS entries
|
# check DHCP leases and add/remove/update DNS entries
|
||||||
# https://rsc.eworm.de/doc/dhcp-to-dns.md
|
# https://rsc.eworm.de/doc/dhcp-to-dns.md
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||||
|
|
@ -28,8 +27,7 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||||
:set ExitOK true;
|
:exit;
|
||||||
:error false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:local Ttl 5m;
|
:local Ttl 5m;
|
||||||
|
|
@ -126,5 +124,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue