mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
netwatch-notify: initialize after lock
This commit is contained in:
@@ -44,12 +44,12 @@
|
|||||||
:return ("Ran hook:\n" . $Hook);
|
:return ("Ran hook:\n" . $Hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ScriptLock $0;
|
||||||
|
|
||||||
:if ([ :typeof $NetwatchNotify ] = "nothing") do={
|
:if ([ :typeof $NetwatchNotify ] = "nothing") do={
|
||||||
: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") ];
|
||||||
|
|||||||
Reference in New Issue
Block a user