1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

netwatch-notify: use $ScriptLock

This commit is contained in:
Christian Hesse
2021-08-27 11:20:57 +02:00
parent d556e97a46
commit 7afce17f70

View File

@ -16,6 +16,7 @@
:global IfThenElse;
:global LogPrintExit2;
:global ParseKeyValueStore;
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
@ -47,6 +48,8 @@
:set NetwatchNotify [ :toarray "" ];
}
$ScriptLock $0;
:foreach Host in=[ / tool netwatch find where comment~"^notify," disabled=no ] do={
:local HostVal [ / tool netwatch get $Host ];
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];