mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-25 05:14:28 +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 UrlEncode;
|
||||||
:global WaitForFile;
|
:global WaitForFile;
|
||||||
:global LogAndError;
|
:global LogAndError;
|
||||||
|
:global LogAndPut;
|
||||||
|
|
||||||
:local FormatExpire do={
|
:local FormatExpire do={
|
||||||
:global CharacterReplace;
|
:global CharacterReplace;
|
||||||
|
@ -85,7 +86,7 @@
|
||||||
"Issuer: " . ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") . "\n" . \
|
"Issuer: " . ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") . "\n" . \
|
||||||
"Validity: " . ($CertNewVal->"invalid-before") . " to " . ($CertNewVal->"invalid-after") . "\n" . \
|
"Validity: " . ($CertNewVal->"invalid-before") . " to " . ($CertNewVal->"invalid-after") . "\n" . \
|
||||||
"Expires in: " . [ $FormatExpire ($CertNewVal->"expires-after") ]) "" "true";
|
"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={
|
} on-error={
|
||||||
:log debug ("Could not renew certificate " . ($CertVal->"name") . ".");
|
:log debug ("Could not renew certificate " . ($CertVal->"name") . ".");
|
||||||
}
|
}
|
||||||
|
@ -109,6 +110,6 @@
|
||||||
"Issuer: " . ($CertVal->"ca") . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\n" . \
|
"Issuer: " . ($CertVal->"ca") . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\n" . \
|
||||||
"Validity: " . ($CertVal->"invalid-before") . " to " . ($CertVal->"invalid-after") . "\n" . \
|
"Validity: " . ($CertVal->"invalid-before") . " to " . ($CertVal->"invalid-after") . "\n" . \
|
||||||
"Expires in: " . $ExpiresAfter);
|
"Expires in: " . $ExpiresAfter);
|
||||||
:log warning ("The certificate " . ($CertVal->"name") . " " . $State . \
|
$LogAndPut warning ("The certificate " . ($CertVal->"name") . " " . $State . \
|
||||||
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue