Skip to content
Snippets Groups Projects
Commit cddb18d6 authored by Jan Philipp Timme's avatar Jan Philipp Timme
Browse files

Modify script output, ignore fullchain

parent 2adc0d81
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ function process_folder { ...@@ -21,7 +21,7 @@ function process_folder {
echo "$folder" echo "$folder"
pemfiles=$(find "$folder" -type f -name '*.pem') pemfiles=$(find "$folder" -type f -name '*.pem')
for pemfile in $pemfiles; do for pemfile in $pemfiles; do
if [[ "$pemfile" =~ \.(dhparam|chain|cacert)\.pem$ ]]; then if [[ "$pemfile" =~ \.(dhparam|fullchain|chain|cacert)\.pem$ ]]; then
continue; continue;
fi fi
pem_subject=$(openssl x509 -in "$pemfile" -noout -text 2>&1 | grep 'Subject:' | tr -s ' ' | cut -d ' ' -f 3-) 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 { ...@@ -46,7 +46,7 @@ function process_folder {
checkmk_status="2" checkmk_status="2"
fi fi
fi fi
echo "$checkmk_status Certificate $pem_cn - $pem_status ($pemfile)" echo "$checkmk_status Certificate $pemfile - $pem_status (CN: $pem_cn)"
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment