diff options
author | Christian Hesse <mail@eworm.de> | 2020-02-26 12:55:38 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-02-26 12:55:38 +0100 |
commit | 3cd9b9ead57e2c62b0409433114a72d1a1e6f4b0 (patch) | |
tree | 8c2957f39bff0a96915b907d2d78ce09fcb21878 | |
parent | b70a460f431e53363880176692b4c2285213a173 (diff) |
check-certificates: use $LogAndPut
-rw-r--r-- | check-certificates | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/check-certificates b/check-certificates index efa5c10..56e9537 100644 --- a/check-certificates +++ b/check-certificates @@ -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") . "."); } |