From 8e6eff30db8197e11cc47d6ca7f0752c63d1f0a1 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 5 Jul 2022 16:36:00 +0200 Subject: netwatch-notify: also support the name from property --- netwatch-notify | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netwatch-notify b/netwatch-notify index 445e329..c7575ea 100644 --- a/netwatch-notify +++ b/netwatch-notify @@ -12,6 +12,7 @@ :global NetwatchNotify; +:global EitherOr; :global IfThenElse; :global IsDNSResolving; :global LogPrintExit2; @@ -61,7 +62,7 @@ $ScriptLock $0; :local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ]; :if ($HostInfo->"notify" = true && $HostInfo->"disabled" != true) do={ - :local Name ($HostInfo->"name"); + :local Name [ $EitherOr ($HostInfo->"name") ($HostVal->"name") ]; :local Metric { "count"=0; "notified"=false }; :if ([ :typeof ($NetwatchNotify->$Name) ] = "array") do={ -- cgit v1.2.3-54-g00ecf