mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-19 18:34:42 +02:00
netwatch-notify: use $ScriptLock
This commit is contained in:
parent
d556e97a46
commit
7afce17f70
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
||||||
|
@ -47,6 +48,8 @@
|
||||||
:set NetwatchNotify [ :toarray "" ];
|
:set NetwatchNotify [ :toarray "" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ScriptLock $0;
|
||||||
|
|
||||||
:foreach Host in=[ / tool netwatch find where comment~"^notify," disabled=no ] do={
|
:foreach Host in=[ / tool netwatch find where comment~"^notify," disabled=no ] do={
|
||||||
:local HostVal [ / tool netwatch get $Host ];
|
:local HostVal [ / tool netwatch get $Host ];
|
||||||
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue