From 2a9c432b493bf7c9b2c636ee4538e5a434f6beac Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 11 Nov 2023 16:27:29 -0600 Subject: [PATCH] update --- defaults.inc | 3 +-- inc/sites.inc | 18 +++++++++--------- templates/nginx.proxy.site | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/defaults.inc b/defaults.inc index 8d313161..d9bc7555 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,5 @@ #!/usr/bin/env bash -# VERS='4.12.120-11102023' -VERS='4.12.128-KYLEUPGRADEv3' +VERS='4.12.140-11112023' noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update ' CERT_DAEMON='/snap/bin/certbot' diff --git a/inc/sites.inc b/inc/sites.inc index eb495351..2d019fb0 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -627,16 +627,16 @@ SITEINFO(){ fi site=${SITELIST[${siteid}]} sitefile=${gosite}/${site}.conf - certpath=$(grep ssl_certificate_key ${sitefile}) - if [ "${certpath}" != "" ]; then + if [ "$(grep \#ssl_certificate ${sitefile})" != "" ]; then + ssl='-' + SUBJECTNAMES="" + else ssl='Yes' + certpath=$(grep ssl_certificate_key ${sitefile}) certpath=${certpath%/*}; certpath=${certpath#* } SUBJECTNAMES=$(openssl x509 -in ${certpath}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV) CERTEXPIRE=$(date -d "$(: | openssl x509 -in ${certpath}/cert.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s'); SUBJECTNAMES=${SUBJECTNAMES//$'\n'/, } - else - ssl='-' - SUBJECTNAMES="" fi if [ "$(grep include/proxy.conf ${sitefile})" != "" ]; then @@ -659,10 +659,10 @@ SITEINFO(){ type='HTTP' proxyhost='' fi - [ "$(grep \\\#include/hsts-support.conf ${sitefile})" != "" ] && hsts='-' || hsts='Yes' - [ "$(grep \\\#include/websocket-support.conf ${sitefile})" != "" ] && wbskt='-' || wbskt='Yes' - [ "$(grep \\\#include/block-exploits.conf ${sitefile})" != "" ] && explt='-' || explt='Yes' - [ "$(grep \\\#include/secure-access.conf ${sitefile})" != "" ] && lock='-' || lock='Yes' + [ "$(grep '\#include conf.d/include/hsts-support.conf' ${sitefile})" != "" ] && hsts='-' || hsts='Yes' + [ "$(grep '\#include conf.d/include/websocket-support.conf' ${sitefile})" != "" ] && wbskt='-' || wbskt='Yes' + [ "$(grep '\#include conf.d/include/block-exploits.conf' ${sitefile})" != "" ] && explt='-' || explt='Yes' + [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" != "" ] && lock='-' || lock='Yes' f=0 until [ "${edit}" = "c" ]; do echo -e "\033[K${idsCL[White]}0) Site Address(es): ${idsCL[Cyan]}${idsST[Bold]}${servernames}${idsST[Reset]}" diff --git a/templates/nginx.proxy.site b/templates/nginx.proxy.site index b6a53c23..3d968e76 100644 --- a/templates/nginx.proxy.site +++ b/templates/nginx.proxy.site @@ -7,7 +7,7 @@ server { listen 80; listen 443 ssl; - + #include conf.d/include/secure-access.conf;