aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-01-02 21:40:40 +0100
committerGravatar Christian Hesse <mail@eworm.de>2022-01-03 10:00:16 +0100
commit491ecdb81254c07840939d9fd21d7f888e6c8386 (patch)
tree8637a520260446c74f37c31621921d505c31fb42
parent7f0a8cdfcd4977ad4cd719d0e8b12bd1a8565a32 (diff)
netwatch-notify: initialize after lock
-rw-r--r--netwatch-notify4
1 files 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") ];