aboutsummaryrefslogtreecommitdiffstats
path: root/check-lte-firmware-upgrade
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-04-28 20:16:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-04-28 20:16:08 +0200
commitda877612209b217fdfd5429889b6d7284bfd10a5 (patch)
tree17fae6776664e6c550c3ba3b2ea7025779b9c35e /check-lte-firmware-upgrade
parentd4c9d1c577d14991a63f285e57fcf2cfaa2d5cd4 (diff)
parent56b75237754eb065aecb932b3082ba0ca29c3f7c (diff)
Merge branch 'notifications' into next
Diffstat (limited to 'check-lte-firmware-upgrade')
-rw-r--r--check-lte-firmware-upgrade15
1 files changed, 8 insertions, 7 deletions
diff --git a/check-lte-firmware-upgrade b/check-lte-firmware-upgrade
index f55ec5f..c05c436 100644
--- a/check-lte-firmware-upgrade
+++ b/check-lte-firmware-upgrade
@@ -15,7 +15,7 @@
:global CharacterReplace;
:global LogPrintExit2;
-:global SendNotification;
+:global SendNotification2;
:global SymbolForNotification;
:foreach Interface in=[ / interface lte find ] do={
@@ -29,12 +29,13 @@
} else={
:if (($Firmware->"installed") != ($Firmware->"latest")) do={
:local Info [ / interface lte info $Interface once as-value ];
- $SendNotification ([ $SymbolForNotification "sparkles" ] . "LTE firmware upgrade") \
- ("A new firmware version " . ($Firmware->"latest") . " is available for " . \
- "LTE interface " . $IntName . " on " . $Identity . ".\n\n" . \
- "Interface: " . [ $CharacterReplace ($Info->"manufacturer" . " " . $Info->"model") ("\"") "" ] . "\n" . \
- "Installed: " . ($Firmware->"installed") . "\n" . \
- "Available: " . ($Firmware->"latest")) "" "true";
+ $SendNotification2 ({ origin=$0; \
+ subject=([ $SymbolForNotification "sparkles" ] . "LTE firmware upgrade"); \
+ message=("A new firmware version " . ($Firmware->"latest") . " is available for " . \
+ "LTE interface " . $IntName . " on " . $Identity . ".\n\n" . \
+ "Interface: " . [ $CharacterReplace ($Info->"manufacturer" . " " . $Info->"model") ("\"") "" ] . "\n" . \
+ "Installed: " . ($Firmware->"installed") . "\n" . \
+ "Available: " . ($Firmware->"latest")); silent=true });
:set SentLteFirmwareUpgradeNotification ($Firmware->"latest");
}
}