Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-06 00:07:57 -06:00
parent e09d2c143f
commit 35f65c953d

View File

@@ -108,12 +108,13 @@ LISTCERTS(){
DIVIDER true
echo -e "Certificate Subject: ${idsST[Bold]}${idsBG[Blue]}${SUBJECT}${idsST[Reset]}${idsBG[Default]}"
if [ "${#SUBJECT_NAMES[*]}" -gt 1 ]; then
anid=1
for ALTNAME in "${SUBJECT_NAMES[@]}"; do
if [ "${anid}" = 1 ]; then alttitle='Alternate Subject(s):'; else alttitle=' '; fi
echo -e "${alttitle} ${idsCL[Cyan]}${ALTNAME}${idsCL[Default]}"
anid=`expr $anid + 1`
done
echo -e "Alternate Subject(s): ${idsCL[Cyan]}${SUBJECTNAMES}${idsCL[Default]}"
#anid=1
#for ALTNAME in "${SUBJECT_NAMES[@]}"; do
# if [ "${anid}" = 1 ]; then alttitle='Alternate Subject(s):'; else alttitle=' '; fi
# echo -e "${alttitle} ${idsCL[Cyan]}${ALTNAME}${idsCL[Default]}"
# anid=`expr $anid + 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]}"