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