aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-08-26 09:23:56 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-08-26 09:29:52 +0200
commitff5cdc30193ba69944f6772f213e63ea00678861 (patch)
treed73fac7cd08f5463c8a432dd5153695ae0cf2cf1 /check-certificates
parent92ca31a41df332171d1f2dcf08c75db570b12234 (diff)
[ ... 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...
Diffstat (limited to 'check-certificates')
-rw-r--r--check-certificates2
1 files changed, 1 insertions, 1 deletions
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" ];