This commit is contained in:
2023-08-12 19:22:14 -05:00
parent c2c669b852
commit f41c464587
2 changed files with 9 additions and 10 deletions

View File

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

View File

@@ -136,8 +136,8 @@ CERTRENEW(){
# $CERT_DAEMON renew --force-renewal --preferred-chain "ISRG Root X1" --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge 2>&1 | tee ${NM_LOGFOLDER}/cert-renewal.lastrun # $CERT_DAEMON renew --force-renewal --preferred-chain "ISRG Root X1" --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge 2>&1 | tee ${NM_LOGFOLDER}/cert-renewal.lastrun
# $CERT_DAEMON --dry-run --preferred-chain "ISRG Root X1" renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge 2>&1 | tee ${NM_LOGFOLDER}/cert-renewal.lastrun # $CERT_DAEMON --dry-run --preferred-chain "ISRG Root X1" renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge 2>&1 | tee ${NM_LOGFOLDER}/cert-renewal.lastrun
CONCAT_SSL CONCAT_SSL
chown -R root:le ${NM_CERTPATH} 2>&1 | tee -a ${NM_LOGFOLDER}/cert-renewal.lastrun chown -R root:le ${NM_CERTPATH} >> ${NM_LOGFOLDER}/cert-renewal.lastrun
chmod -R 6775 ${NM_CERTPATH} 2>&1 | tee -a ${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 yes | cp -rfH ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_CERTPATH}/cert-renewal.lastrun
daterun=`date +%Y-%m-%d-%H-%M-%S` daterun=`date +%Y-%m-%d-%H-%M-%S`
echo -e "${daterun}" >> ${NM_CERTPATH}/cert-renewal.lastrun echo -e "${daterun}" >> ${NM_CERTPATH}/cert-renewal.lastrun
@@ -146,7 +146,7 @@ CERTRENEW(){
# ssh root@webserver-node2.scity.us service nginx start # ssh root@webserver-node2.scity.us service nginx start
# echo -e "${idsCL[LightGreen]} Completed${idsCL[Default]}" # echo -e "${idsCL[LightGreen]} Completed${idsCL[Default]}"
echo echo
SERVICE nginx reload 2>&1 | tee -a ${NM_LOGFOLDER}/cert-renewal.lastrun SERVICE nginx reload >> ${NM_LOGFOLDER}/cert-renewal.lastrun
echo -e "${idsCL[LightGreen]}The certificates have been renewed.${idsCL[Default]}" echo -e "${idsCL[LightGreen]}The certificates have been renewed.${idsCL[Default]}"
echo echo
if [ -z $action ] || [ "${action}" = "gui" ]; then if [ -z $action ] || [ "${action}" = "gui" ]; then
@@ -158,15 +158,14 @@ NIGHTLYRENEW(){
# rm -f ${NM_LOGFOLDER}/cert-renewal.lastrun # rm -f ${NM_LOGFOLDER}/cert-renewal.lastrun
# ssh root@webserver-node2.scity.us service nginx stop # ssh root@webserver-node2.scity.us service nginx stop
# sleep 5 # sleep 5
$CERT_DAEMON renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge &>> ${NM_LOGFOLDER}/cert-renewal.lastrun $CERT_DAEMON renew --webroot -w ${NM_CERTPATH}/letsencrypt-acme-challenge 2>&1 | tee ${NM_LOGFOLDER}/cert-renewal.lastrun
CONCAT_SSL CONCAT_SSL
chown -R root:le ${NM_CERTPATH} &>> ${NM_LOGFOLDER}/cert-renewal.lastrun chown -R root:le ${NM_CERTPATH} >> ${NM_LOGFOLDER}/cert-renewal.lastrun
chmod -R 6775 ${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` daterun=`date +%Y-%m-%d-%H-%M-%S`
echo -e "${daterun}" >> ${NM_CERTPATH}/cert-renewal.lastrun echo -e "${daterun}" >> ${NM_CERTPATH}/cert-renewal.lastrun
# ssh root@webserver-node2.scity.us service nginx start yes | cp -rfH ${NM_LOGFOLDER}/cert-renewal.lastrun ${NM_CERTPATH}/cert-renewal.lastrun
SERVICE nginx reload web &>> ${NM_LOGFOLDER}/cert-renewal.lastrun SERVICE nginx reload >> ${NM_LOGFOLDER}/cert-renewal.lastrun
} }
CONCAT_SSL(){ CONCAT_SSL(){