From 5ee0be65c0ea619e551d607593d44f32514ed6c1 Mon Sep 17 00:00:00 2001 From: Root THC Date: Sun, 1 Dec 2024 21:19:27 +0000 Subject: [PATCH] CN --- tools/whatserver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/whatserver.sh b/tools/whatserver.sh index 55e5c2f..501dc3c 100755 --- a/tools/whatserver.sh +++ b/tools/whatserver.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# Script to quickly display essential server information. Qualtiy, not quantity. +# Script to quickly display essential server information. Quality, not quantity. # - Extracts FQDN from certificates, nginx & apache conf # - Most recent activities / uses. # @@ -133,7 +133,7 @@ addx509() { # Extract CN str="$(echo "$x509" | openssl x509 -noout -subject 2>/dev/null)" - [[ "$str" == "subject"* ]] && [[ "$str" != *"/CN"* ]] && { + [[ "$str" == "subject"* ]] && [[ "$str" == *"/CN"* ]] && { str="$(echo "$str" | sed '/^subject/s/^.*CN.*=[ ]*//g')" addcn "$str" }