From ff5cdc30193ba69944f6772f213e63ea00678861 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Aug 2020 09:23:56 +0200 Subject: [ ... print count-only ...] -> [ :len [ ... find ... ] ] Using 'print count-only' always prints a number to terminal, even if the value is evaluated in a condition or assigned to a variable. This can be quite annoying. Behavior will not chance (SUP-25503), so replacing the code... --- check-certificates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check-certificates') diff --git a/check-certificates b/check-certificates index a0e5bce..5ac8a18 100644 --- a/check-certificates +++ b/check-certificates @@ -101,7 +101,7 @@ $WaitFullyConnected; :foreach Cert in=[ / certificate find where !revoked !scep-url expires-after<2w fingerprint~"." ] do={ :local CertVal [ / certificate get $Cert ]; - :if ([ / certificate scep-server print count-only where ca-cert=($CertVal->"ca") ] > 0) do={ + :if ([ :len [ / certificate scep-server find where ca-cert=($CertVal->"ca") ] ] > 0) do={ $LogPrintExit debug ("Certificate \"" . ($CertVal->"name") . "\" is handled by SCEP, skipping.") false; } else={ :local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ]; -- cgit v1.2.3-54-g00ecf