From 6152ef1c17a03fa651b271a4f051e8911ae7db42 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 6 Oct 2021 15:05:12 +0200 Subject: [PATCH] add check_ssl_certs --- check_ssl_certs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/check_ssl_certs b/check_ssl_certs index 9a1a5e6..55b9650 100755 --- a/check_ssl_certs +++ b/check_ssl_certs @@ -45,11 +45,12 @@ Check locally installed SSL client certificates and warn if the expiration date comes closer. SYNTAX: -`basename $0` [-w WARN_LIMIT] [-c CRITICAL_LIMIT] [-f FILELIST] +`basename $0` [-w WARN_LIMIT] [-c CRITICAL_LIMIT] [-f "FILELIST"] OPTIONS: - -f FILELIST file filter to find certificates using globbing (default: $filelist) + -f FILELIST file filter to find certificates using globbing + (default: $filelist) To use multiple sources seperate them with a space char. Quote your parameter value if you use multiple sources or * char. -w VALUE warning level in days before expiration (default: $iWarn) @@ -63,7 +64,7 @@ PARAMETERS: EXAMPLE: - `basename $0` -f "/etc/ssl/certs/*example.com.*.cer /etc/somewhere/else/*.cer" + `basename $0` -f "/etc/ssl/certs/*example.com.*.cer /somewhere/else/*.cer" Set 2 folders where to find the client certificates. They are seperated by space and both use * for globbing @@ -106,7 +107,7 @@ typeset -i iTotal=$( ls -1 $filelist 2>/dev/null | wc -l ) if [ $iTotal -eq 0 ]; then bHasWarning=true shortstatus="No cert was found." - fullstatus="!!! Warning: no file matches the file filter. HINT: a $filelist." + fullstatus="!!! Warning: no file matches the file filter. HINT: adjust your file filter in -f FILEFILTER" fi for mycert in $( ls -1 $filelist 2>/dev/null ) do -- GitLab