Update nodemgmt-scripts.sh
This commit is contained in:
@@ -134,29 +134,11 @@ LISTCERTS(){
|
||||
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed "s/${SUBJECT}//g")
|
||||
CERTEXPIRE=$(date -d "$(: | openssl x509 -in ${certdir}/cert.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
|
||||
DAYS=14; DUEIN=$(($(date +%s) + (86400*$DAYS)));
|
||||
|
||||
#DIVIDER true
|
||||
#echo -e "Certificate Subject: ${idsST[Bold]}${idsBG[Blue]}${SUBJECT}${idsST[Reset]}${idsBG[Default]}"
|
||||
#if [ "$SUBJECTNAMES" != "" ]; then
|
||||
# echo -e "Alternate Subject(s): ${idsCL[Cyan]}${SUBJECTNAMES}${idsCL[Default]}"
|
||||
#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
|
||||
# echo -e "Expiration Date: ${idsCL[Green]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsCL[Default]}"
|
||||
#fi
|
||||
#echo ""
|
||||
declare -i cw
|
||||
declare -i spc1
|
||||
declare -i c
|
||||
c=1
|
||||
cw=30
|
||||
|
||||
declare -i cw; declare -i spc1; declare -i c
|
||||
c=1; cw=30; spc=''
|
||||
spc1=${cw}-${#SUBJECT}
|
||||
spc=''
|
||||
until [ $c = ${spc1} ]; do
|
||||
spc="${spc} "
|
||||
c=`expr $c + 1`
|
||||
done
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
if [ $DUEIN -gt $CERTEXPIRE ]; then
|
||||
date="${idsST[Bold]}${idsCL[Red]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsST[Reset]}${idsCL[Default]}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user