This commit is contained in:
2023-08-12 19:32:10 -05:00
parent 22e985bf2c
commit d939fb1aab
3 changed files with 11 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='4.10.55-08122023'
VERS='4.10.58-08122023'
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns '
CERT_DAEMON='/snap/bin/certbot'

View File

@@ -160,15 +160,10 @@ NIGHTLYRENEW(){
# rm -f ${NM_LOGFOLDER}/cert-renewal.lastrun
# ssh root@webserver-node2.scity.us service nginx stop
# sleep 5
mv -f ${NM_LOGFOLDER}/cert-renewal1.lastrun ${NM_LOGFOLDER}/cert-renewal2.lastrun >/dev/null 2>&1
mv -f ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_LOGFOLDER}/cert-renewal1.lastrun >/dev/null 2>&1
$CERT_DAEMON renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge > ${NM_LOGFOLDER}/cert-renewal.lastrun >/dev/null 2>&1
$CERT_DAEMON renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge
CONCAT_SSL
chown -R root:le ${NM_CERTPATH} >> ${NM_LOGFOLDER}/cert-renewal.lastrun
chmod -R 6775 ${NM_CERTPATH} >> ${NM_LOGFOLDER}/cert-renewal.lastrun
daterun=`date +%Y-%m-%d-%H-%M-%S`
echo -e "${daterun}" >> ${NM_CERTPATH}/cert-renewal.lastrun
yes | cp -rfH ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_CERTPATH}/cert-renewal.lastrun
chown -R root:le ${NM_CERTPATH}
chmod -R 6775 ${NM_CERTPATH}
SERVICE nginx reload >> ${NM_LOGFOLDER}/cert-renewal.lastrun
}

View File

@@ -772,7 +772,13 @@ GUI(){
copynpmcerts) COPYCERTS_NPM ${2};;
checknpmcerts) CHECK_NPMCERTS;;
checkcerts) CHECK-CERTS ${2};;
nightlyrenew) NIGHTLYRENEW;;
nightlyrenew)
mv -f ${NM_LOGFOLDER}/cert-renewal1.lastrun ${NM_LOGFOLDER}/cert-renewal2.lastrun >/dev/null 2>&1
mv -f ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_LOGFOLDER}/cert-renewal1.lastrun >/dev/null 2>&1
NIGHTLYRENEW > ${NM_LOGFOLDER}/cert-renewal.lastrun
echo -e "\n$(date +%Y-%m-%d-%H-%M-%S)" >> ${NM_CERTPATH}/cert-renewal.lastrun
yes | cp -rfH ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_CERTPATH}/cert-renewal.lastrun
;;
delsite) DELSITE ${2} ${3} ${4} ${5};;
delsites) DELSITES;;
newsite) NEWSITE ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} ${24} ${25};;