From cddb18d607cfd7172024dbc25e24a96117cc1e6d Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme <jan.philipp@timme.it> Date: Wed, 10 Mar 2021 11:58:08 +0100 Subject: [PATCH] Modify script output, ignore fullchain --- checkmk/custom-files/local/monitor-certificates | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checkmk/custom-files/local/monitor-certificates b/checkmk/custom-files/local/monitor-certificates index 7e9be91..d7bd275 100644 --- a/checkmk/custom-files/local/monitor-certificates +++ b/checkmk/custom-files/local/monitor-certificates @@ -21,7 +21,7 @@ function process_folder { echo "$folder" pemfiles=$(find "$folder" -type f -name '*.pem') for pemfile in $pemfiles; do - if [[ "$pemfile" =~ \.(dhparam|chain|cacert)\.pem$ ]]; then + if [[ "$pemfile" =~ \.(dhparam|fullchain|chain|cacert)\.pem$ ]]; then continue; fi pem_subject=$(openssl x509 -in "$pemfile" -noout -text 2>&1 | grep 'Subject:' | tr -s ' ' | cut -d ' ' -f 3-) @@ -46,7 +46,7 @@ function process_folder { checkmk_status="2" fi fi - echo "$checkmk_status Certificate $pem_cn - $pem_status ($pemfile)" + echo "$checkmk_status Certificate $pemfile - $pem_status (CN: $pem_cn)" done } -- GitLab