This commit is contained in:
2023-11-15 22:18:05 -06:00
parent 7ec8040b1f
commit 8c5b2227a3
6 changed files with 36 additions and 51 deletions

View File

@@ -126,9 +126,6 @@ DEL-SSL(){
}
CERTRENEW(){
# echo -en "${idsCL[LightCyan]}Stopping Webserver-Node2...${idsCL[Default]}"
# ssh root@webserver-node2.scity.us service nginx stop
# echo -e "${idsCL[LightGreen]} Completed${idsCL[Default]}"
echo
echo -e "${idsCL[LightGreen]}Renewing Certificates...${idsCL[Default]}"
echo
@@ -144,9 +141,6 @@ CERTRENEW(){
daterun=`date +%Y-%m-%d-%H-%M-%S`
echo -e "${daterun}" >> ${NM_LOGFOLDER}/cert-renewal.lastrun
DIVIDER true
# echo -en "${idsCL[LightCyan]}Starting Webserver-Node2 Back up...${idsCL[Default]}"
# ssh root@webserver-node2.scity.us service nginx start
# echo -e "${idsCL[LightGreen]} Completed${idsCL[Default]}"
echo
SERVICE nginx reload >> ${NM_LOGFOLDER}/cert-renewal.lastrun
echo -e "${idsCL[LightGreen]}The certificates have been renewed.${idsCL[Default]}"
@@ -157,9 +151,6 @@ CERTRENEW(){
fi
}
NIGHTLYRENEW(){
# rm -f ${NM_LOGFOLDER}/cert-renewal.lastrun
# ssh root@webserver-node2.scity.us service nginx stop
# sleep 5
$CERT_DAEMON renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge
CONCAT_SSL
chown -R root:le ${NM_CERTPATH}
@@ -410,16 +401,12 @@ LISTCERTS(){
checkcerts_sorted=$(sort <<< "$(cat ${NM_FOLDER}/conf/ssl-domain-checks.conf)")
rm -f ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1
echo "${checkcerts_sorted}" > ${NM_FOLDER}/conf/ssl-domain-checks.conf
if [ "${NM_NODEMANAGER}" != "$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" ]; then
scp -q ${NM_FOLDER}/conf/ssl-domain-checks.conf root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/ssl-domain-checks.conf
fi
[ "${RUN_NODE_TYPE}" != "NM" ] && scp -q ${NM_FOLDER}/conf/ssl-domain-checks.conf root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/ssl-domain-checks.conf
fi
else
sed -i "/${SUBJECT}/d" ${NM_FOLDER}/conf/ssl-domain-checks.conf >/dev/null 2&>1
if [ "${NM_NODEMANAGER}" != "$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" ]; then
scp -q ${NM_FOLDER}/conf/ssl-domain-checks.conf root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/ssl-domain-checks.conf
fi
[ "${RUN_NODE_TYPE}" != "NM" ] && scp -q ${NM_FOLDER}/conf/ssl-domain-checks.conf root@${NM_NODEMANAGER}:${NM_FOLDER}/conf/ssl-domain-checks.conf
fi
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
echo