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