Update nodemgmt-scripts.sh
This commit is contained in:
@@ -611,13 +611,15 @@ LISTCERTS(){
|
||||
SUBJECT=$(${NCMD} openssl x509 -in ${certdir}cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
|
||||
SUBJECTNAMES=$(${NCMD} openssl x509 -in ${certdir}cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
|
||||
CERTEXPIRE=$(date -d "$(: | ${NCMD} openssl x509 -in ${certdir}cert.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
|
||||
echo 'yes'
|
||||
|
||||
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/, }
|
||||
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed "s/${SUBJECT}, //g")
|
||||
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed "s/, ${SUBJECT}//g")
|
||||
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed "s/${SUBJECT}//g")
|
||||
IFS=', '; SUBJECT_NAMES=(${SUBJECTNAMES}); unset IFS
|
||||
DAYS=14; DUEIN=$(($(date +%s) + (86400*$DAYS)));
|
||||
echo 'yes'
|
||||
|
||||
|
||||
c=0; cw=26; spc=''
|
||||
spc1=${cw}-${#SUBJECT}
|
||||
|
||||
Reference in New Issue
Block a user