From 4a85deb45c5f6a0231180e57ade1c2d600262f4b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 18 Oct 2020 20:13:58 +0200 Subject: log-forward: improve wording for single message --- log-forward | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/log-forward b/log-forward index 27aa19c..fdabbf8 100644 --- a/log-forward +++ b/log-forward @@ -12,6 +12,7 @@ :global LogForwardLast; :global LogForwardRateLimit; +:global IfThenElse; :global LogPrintExit; :global MailServerIsUp; :global ScriptLock; @@ -55,8 +56,9 @@ $WaitFullyConnected; :if ($Count > 0) do={ $SendNotification ([ $SymbolForNotification "warning-sign" ] . "Log Forwarding") \ - ("The log on " . $Identity . " contains these " . $Count . " messages after " . \ - [ / system resource get uptime ] . " uptime.\n" . $Messages); + ("The log on " . $Identity . " contains " . [ $IfThenElse ($Count = 1) \ + "this message" ("these " . $Count . " messages") ] . " after " . \ + [ / system resource get uptime ] . " uptime.\n" . $Messages); :set LogForwardRateLimit ($LogForwardRateLimit + 10); :set LogForwardLast ($MessageVal->".id"); -- cgit v1.2.3-54-g00ecf