mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-03 17:54:36 +02:00
check-routeros-update: send notification on renewed license...
... when a warning has been sent before.
This commit is contained in:
parent
6909514692
commit
16c9ce437e
1 changed files with 10 additions and 0 deletions
|
@ -92,6 +92,16 @@
|
|||
:set SentCertificateNotification "warning";
|
||||
}
|
||||
}
|
||||
|
||||
:if ([ :typeof $SentCertificateNotification ] = "str" && \
|
||||
[ :totime ($License->"deadline-at") ] - 4w > [ :timestamp ]) do={
|
||||
$LogPrint info $ScriptName ("Your license was successfully renewed.");
|
||||
$SendNotification2 ({ origin=$ScriptName; \
|
||||
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "License renewed"); \
|
||||
message=("Your license was successfully renewed on " . $Identity . \
|
||||
". It is now valid until " . ($License->"deadline-at") . ".") });
|
||||
:set SentCertificateNotification;
|
||||
}
|
||||
}
|
||||
|
||||
$LogPrint debug $ScriptName ("Checking for updates...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue