From 0d49a57f21207c1c394922086d8c79885a9a7007 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 4 Feb 2019 22:59:49 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d2d03e79..270cb8e0 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -94,9 +94,14 @@ LISTCERTS(){ DIVIDER true echo -e "Certificate Subject: ${idsST[Bold]}${idsCL[Cyan]}${SUBJECT}${idsST[Reset]}${idsCL[Default]}" - for ALTNAME in "${SUBJECTNAMES[@]}"; do - echo -e "Alternate Subject: ${idsCL[LightCyan]}${ALTNAME}${idsCL[Default]}" - done + if [ "${#foo[*]}" -gt 1 ]; then + anid=1 + for ALTNAME in "${SUBJECTNAMES[@]}"; do + if [ "${anid}" = 1 ]; then alttitle='Alternate Subject:'; else alttitle=' '; fi + echo -e " ${idsCL[LightCyan]}${ALTNAME}${idsCL[Default]}" + anid=`expr $nid + 1` + done + fi if [ $DUEIN -gt $CERTEXPIRE ]; then echo -e "Expiration Date: ${idsST[Bold]}${idsCL[Red]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsST[Reset]}${idsCL[Default]}" else