aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--netwatch-notify3
1 files changed, 2 insertions, 1 deletions
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={