mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-09-01 08:15:26 +02:00
global-functions: $ScriptLock: do not exit from global function
This commit is contained in:
parent
56e97dd60c
commit
1e8918fdaa
57 changed files with 172 additions and 61 deletions
|
@ -34,7 +34,9 @@
|
|||
$LogPrintExit2 debug $ScriptName ("DHCP Server " . $leaseServerName . " " . [ $IfThenElse ($leaseBound = 0) \
|
||||
"de" "" ] . "assigned lease " . $leaseActIP . " to " . $leaseActMAC) false;
|
||||
|
||||
$ScriptLock $ScriptName false 10;
|
||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||
:return false;
|
||||
}
|
||||
|
||||
:if ([ :len [ /system/script/job/find where script=$ScriptName ] ] > 1) do={
|
||||
$LogPrintExit2 debug $ScriptName ("More invocations are waiting, exiting early.") false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue