This commit is contained in:
2023-11-12 19:16:36 -06:00
parent a803e657c6
commit 7113174716
2 changed files with 14 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='4.13.21-11122023'
VERS='4.13.22-11122023'
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'

View File

@@ -767,6 +767,7 @@ SITEINFO(){
SUBJECTNAMES=""
else
ssl='Yes'
certpath=$(grep ssl_certificate_key ${sitefile})
certpath=${certpath%/*}
certpath=${certpath#* }
@@ -774,31 +775,28 @@ SITEINFO(){
CERTEXPIRE=$(date -d "$(: | openssl x509 -in ${certpath}/cert.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/, }
fi
if [ "$(grep include/proxy.conf ${sitefile})" != "" ]; then
type='Proxy'
server=$(grep 'set $server' ${sitefile})
server=${server#*\"}; server=${server%\"*}
servernames=$(grep 'server_name' ${sitefile})
if [ "$(echo "${siteconfig}" | grep include/proxy.conf)" != "" ]; then
type='Proxy'
server=$(echo "${siteconfig}" | grep 'set $server')
server=${server#*\"}; server=${server%\"*}
servernames=$(echo "${siteconfig}" | grep 'server_name')
servernames=${servernames//;/}
servernames=${servernames#* }
servernames=${servernames// /,}
scheme=$(grep 'set $forward_scheme' ${sitefile})
scheme=$(echo "${siteconfig}" | grep 'set $forward_scheme')
scheme=${scheme##* }; scheme=${scheme%;*}
port=$(grep 'set $port' ${sitefile})
port=$(echo "${siteconfig}" | grep 'set $port')
port=${port##* }; port=${port%;*}
else
type='HTTP'
fi
[ "$(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'
if [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" == "" ]; then
sitefacline=$(ssh root@${NM_AUTHELIA_IP} grep -Fn ${site} /mnt/web-data/authelia/config/configuration.yml | sort | tail -n1)
[ "$(echo "${siteconfig}" | grep '\#include conf.d/include/hsts-support.conf')" != "" ] && hsts='-' || hsts='Yes'
[ "$(echo "${siteconfig}" | grep '\#include conf.d/include/websocket-support.conf')" != "" ] && wbskt='-' || wbskt='Yes'
[ "$(echo "${siteconfig}" | grep '\#include conf.d/include/block-exploits.conf')" != "" ] && explt='-' || explt='Yes'
if [ "$(echo "${siteconfig}" | grep '\#include conf.d/include/secure-access.conf')" == "" ]; then
sitefacline=$(echo "${autheliaconfig}" | grep -Fn ${site} | sort | tail -n1)
sitefacline=${onefacline%%:*}
if [ "${sitefacline}" == "" ]; then
lock='error'