netwatch-notify: support sending silent notifications

This commit is contained in:
Christian Hesse 2023-02-19 14:45:18 +01:00
parent fe0460ef6d
commit 8213c5ed61

View file

@ -116,7 +116,7 @@ $ScriptLock $0;
:set Message ($Message . "\n\n" . [ $NetwatchNotifyHook $Name $Type "up" \
($HostInfo->"up-hook") ]);
}
$SendNotification2 ({ origin=$0; \
$SendNotification2 ({ origin=$0; silent=($HostInfo->"silent"); \
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Netwatch Notify: " . \
$Name . " up"); \
message=$Message });
@ -167,7 +167,7 @@ $ScriptLock $0;
($HostInfo->"down-hook") ]);
}
:if ($HostInfo->"no-down-notification" != true) do={
$SendNotification2 ({ origin=$0; \
$SendNotification2 ({ origin=$0; silent=($HostInfo->"silent"); \
subject=([ $SymbolForNotification "cross-mark" ] . "Netwatch Notify: " . \
$Name . " down"); \
message=$Message });