aboutsummaryrefslogtreecommitdiffstats
path: root/log-forward
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-10-18 20:13:58 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-10-18 20:16:54 +0200
commit4a85deb45c5f6a0231180e57ade1c2d600262f4b (patch)
tree0f01ed75a516dd03c0a3d48d231f0415106a2943 /log-forward
parent211edb93c0dc0a1c469694d5e137b5a10ac7438b (diff)
log-forward: improve wording for single message
Diffstat (limited to 'log-forward')
-rw-r--r--log-forward6
1 files 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");