mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-28 04:10:07 +02:00
global-functions: $ScriptLock: simplify cleanup code
This commit is contained in:
parent
a46fd48187
commit
6dede0c49b
1 changed files with 2 additions and 5 deletions
|
@ -958,16 +958,13 @@
|
|||
|
||||
:global ScriptLockOrder;
|
||||
|
||||
:local Clean true;
|
||||
:foreach Ticket in=($ScriptLockOrder->$Script) do={
|
||||
:if ([ :typeof $Ticket ] != "nothing") do={
|
||||
:set Clean false;
|
||||
:return false;
|
||||
}
|
||||
}
|
||||
|
||||
:if ($Clean = true) do={
|
||||
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
|
||||
}
|
||||
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
|
||||
}
|
||||
|
||||
:if ([ :len [ / system script find where name=$Script ] ] = 0) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue