netwatch-notify: properly initialize default values

This commit is contained in:
Christian Hesse 2020-03-05 08:15:36 +01:00
parent 792eba8465
commit f90c59e4fb

View file

@ -18,7 +18,7 @@
:local HostName ([ $ParseKeyValueStore ($HostVal->"comment") ]->"hostname");
:if ([ :typeof ($NetwatchNotify->$HostName) ] = "nothing") do={
:set ($NetwatchNotify->$HostName) [ :toarray "" ];
:set ($NetwatchNotify->$HostName) { "count"=0; "notified"=false };
}
:if ($HostVal->"status" = "up") do={