From 3cd9b9ead57e2c62b0409433114a72d1a1e6f4b0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Feb 2020 12:55:38 +0100 Subject: check-certificates: use $LogAndPut --- check-certificates | 5 +++-- 1 file 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") . "."); } -- cgit v1.2.3-70-g09d2