mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-07 03:35:37 +02:00
check-certificates: add certificate name in notification subject
This commit is contained in:
parent
be0bbe80d9
commit
fb9feea595
1 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ $WaitFullyConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$0; silent=true; \
|
$SendNotification2 ({ origin=$0; silent=true; \
|
||||||
subject=([ $SymbolForNotification "lock-with-ink-pen" ] . "Certificate renewed"); \
|
subject=([ $SymbolForNotification "lock-with-ink-pen" ] . "Certificate renewed: " . ($CertVal->"name")); \
|
||||||
message=("A certificate on " . $Identity . " has been renewed.\n\n" . [ $FormatInfo $CertVal ]) });
|
message=("A certificate on " . $Identity . " has been renewed.\n\n" . [ $FormatInfo $CertVal ]) });
|
||||||
$LogPrintExit2 info $0 ("The certificate " . ($CertVal->"name") . " has been renewed.") false;
|
$LogPrintExit2 info $0 ("The certificate " . ($CertVal->"name") . " has been renewed.") false;
|
||||||
} on-error={
|
} on-error={
|
||||||
|
@ -176,7 +176,7 @@ $WaitFullyConnected;
|
||||||
:local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ];
|
:local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ];
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$0; \
|
$SendNotification2 ({ origin=$0; \
|
||||||
subject=([ $SymbolForNotification "warning-sign" ] . "Certificate warning!"); \
|
subject=([ $SymbolForNotification "warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
|
||||||
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $CertVal ]) });
|
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $CertVal ]) });
|
||||||
$LogPrintExit2 info $0 ("The certificate " . ($CertVal->"name") . " " . $State . \
|
$LogPrintExit2 info $0 ("The certificate " . ($CertVal->"name") . " " . $State . \
|
||||||
", it is invalid after " . ($CertVal->"invalid-after") . ".") false;
|
", it is invalid after " . ($CertVal->"invalid-after") . ".") false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue