mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-23 20:34:27 +02:00
check-certificates: use $LogAndPut
This commit is contained in:
parent
b70a460f43
commit
3cd9b9ead5
1 changed files with 3 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
:global UrlEncode;
|
||||
:global WaitForFile;
|
||||
:global LogAndError;
|
||||
:global LogAndPut;
|
||||
|
||||
:local FormatExpire do={
|
||||
:global CharacterReplace;
|
||||
|
@ -85,7 +86,7 @@
|
|||
"Issuer: " . ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") . "\n" . \
|
||||
"Validity: " . ($CertNewVal->"invalid-before") . " to " . ($CertNewVal->"invalid-after") . "\n" . \
|
||||
"Expires in: " . [ $FormatExpire ($CertNewVal->"expires-after") ]) "" "true";
|
||||
:log info ("The certificate " . ($CertVal->"name") . " has been renewed.");
|
||||
$LogAndPut info ("The certificate " . ($CertVal->"name") . " has been renewed.");
|
||||
} on-error={
|
||||
:log debug ("Could not renew certificate " . ($CertVal->"name") . ".");
|
||||
}
|
||||
|
@ -109,6 +110,6 @@
|
|||
"Issuer: " . ($CertVal->"ca") . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\n" . \
|
||||
"Validity: " . ($CertVal->"invalid-before") . " to " . ($CertVal->"invalid-after") . "\n" . \
|
||||
"Expires in: " . $ExpiresAfter);
|
||||
:log warning ("The certificate " . ($CertVal->"name") . " " . $State . \
|
||||
$LogAndPut warning ("The certificate " . ($CertVal->"name") . " " . $State . \
|
||||
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue