netwatch-notify: initialize after lock

This commit is contained in:
Christian Hesse 2022-01-02 21:40:40 +01:00
parent 7f0a8cdfcd
commit 491ecdb812

View file

@ -44,12 +44,12 @@
:return ("Ran hook:\n" . $Hook);
}
$ScriptLock $0;
:if ([ :typeof $NetwatchNotify ] = "nothing") do={
: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") ];