Update nodemgmt-scripts.sh
This commit is contained in:
@@ -89,7 +89,7 @@ LISTCERTS(){
|
|||||||
SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
|
SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
|
||||||
SUBJECTNAMES=$(openssl x509 -in ${certdir}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
|
SUBJECTNAMES=$(openssl x509 -in ${certdir}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
|
||||||
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/,}
|
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/,}
|
||||||
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed 's/${SUBJECT}//g')
|
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed 's/$SUBJECT/,/g')
|
||||||
IFS=','; SUBJECT_NAMES=(${SUBJECTNAMES}); unset IFS
|
IFS=','; SUBJECT_NAMES=(${SUBJECTNAMES}); unset IFS
|
||||||
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)));
|
||||||
|
|||||||
Reference in New Issue
Block a user