aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-08-27 11:20:57 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-08-27 11:20:57 +0200
commit7afce17f70555e1dd07e4a3a54af789cc408bed9 (patch)
treeaaeb26ca0a99cc199e45be3d20197c19e537e90d
parentd556e97a465b27fad7aa1cec6be48b7867b401c6 (diff)
netwatch-notify: use $ScriptLock
-rw-r--r--netwatch-notify3
1 files changed, 3 insertions, 0 deletions
diff --git a/netwatch-notify b/netwatch-notify
index 966d415..7fdf5b5 100644
--- a/netwatch-notify
+++ b/netwatch-notify
@@ -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") ];