From 491ecdb81254c07840939d9fd21d7f888e6c8386 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 2 Jan 2022 21:40:40 +0100 Subject: netwatch-notify: initialize after lock --- netwatch-notify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netwatch-notify b/netwatch-notify index 767168b..da6c5ce 100644 --- a/netwatch-notify +++ b/netwatch-notify @@ -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") ]; -- cgit v1.2.3-70-g09d2