Update nodemgmt-scripts.sh
This commit is contained in:
@@ -119,7 +119,7 @@ NIGHTLYRENEW(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
LISTCERTS(){
|
LISTCERTS(){
|
||||||
#DIVIDER true
|
DIVIDER true
|
||||||
for certdir in /etc/letsencrypt/live/*/ ; do
|
for certdir in /etc/letsencrypt/live/*/ ; do
|
||||||
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)
|
||||||
@@ -130,7 +130,7 @@ 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
|
#DIVIDER true
|
||||||
#echo -e "Certificate Subject: ${idsST[Bold]}${idsBG[Blue]}${SUBJECT}${idsST[Reset]}${idsBG[Default]}"
|
#echo -e "Certificate Subject: ${idsST[Bold]}${idsBG[Blue]}${SUBJECT}${idsST[Reset]}${idsBG[Default]}"
|
||||||
#if [ "$SUBJECTNAMES" != "" ]; then
|
#if [ "$SUBJECTNAMES" != "" ]; then
|
||||||
# echo -e "Alternate Subject(s): ${idsCL[Cyan]}${SUBJECTNAMES}${idsCL[Default]}"
|
# echo -e "Alternate Subject(s): ${idsCL[Cyan]}${SUBJECTNAMES}${idsCL[Default]}"
|
||||||
@@ -157,10 +157,9 @@ LISTCERTS(){
|
|||||||
else
|
else
|
||||||
date="${idsCL[Green]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsCL[Default]}"
|
date="${idsCL[Green]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
echo -e "${idsCL[Cyan]}${SUBJECT}${spc}${date} ${idsCL[Cyan]}${SUBJECTNAMES}${idsCL[Default]}"
|
echo -e "${idsCL[Cyan]}${SUBJECT}${spc}${date} ${idsCL[Cyan]}${SUBJECTNAMES}${idsCL[Default]}"
|
||||||
echo
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
echo
|
||||||
if [ -z $action ] || [ "${action}" = "gui" ]; then
|
if [ -z $action ] || [ "${action}" = "gui" ]; then
|
||||||
DIVIDER true
|
DIVIDER true
|
||||||
ENTER2CONTINUE
|
ENTER2CONTINUE
|
||||||
|
|||||||
Reference in New Issue
Block a user