This commit is contained in:
2023-08-12 19:38:49 -05:00
parent d939fb1aab
commit a8bff7eac7
3 changed files with 3 additions and 8 deletions

View File

@@ -28,10 +28,7 @@ NEWCERT(){
touch ${NM_CERTPATH}/live/${MAIN_CERT}/newcert
if [ -f ${NM_NGINXPATH}/sites-enabled/${MAIN_CERT}.conf ]; then
rm -f ${NM_LOGFOLDER}/cert-request.lastrun
daterun=`date +%Y-%m-%d-%H-%M-%S`
echo -e "${NEW_CERT}\n${daterun}" > ${NM_LOGFOLDER}/cert-request.lastrun
yes | cp -rfH ${NM_LOGFOLDER}/cert-request.lastrun ${NM_CERTPATH}/cert-request.lastrun
echo -e "$(date +%Y-%m-%d-%H-%M-%S) - ${NEW_CERT}" >> ${NM_LOGFOLDER}/cert.requests
DIVIDER true
if [ "${2}" != "newsite" ] && [ "${NM_HOSTS['LB']}" != "" ]; then
echo -e -n "${idsCL[LightCyan]}Reload NGINX on LB Nodes (Y/n): ${idsCL[Default]}"
@@ -140,9 +137,8 @@ CERTRENEW(){
CONCAT_SSL
chown -R root:le ${NM_CERTPATH} >> ${NM_LOGFOLDER}/cert-renewal.lastrun
chmod -R 6775 ${NM_CERTPATH} >> ${NM_LOGFOLDER}/cert-renewal.lastrun
yes | cp -rfH ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_CERTPATH}/cert-renewal.lastrun
daterun=`date +%Y-%m-%d-%H-%M-%S`
echo -e "${daterun}" >> ${NM_CERTPATH}/cert-renewal.lastrun
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