Update sites.inc
This commit is contained in:
@@ -655,13 +655,13 @@ SITEINFO(){
|
||||
if [ "${SEARCH}" != "0" ]; then
|
||||
sites=$(find ${gosite}/*${SEARCH,,}*.conf)
|
||||
else
|
||||
echo not searching
|
||||
sites=$(find ${gosite}/*.conf)
|
||||
fi
|
||||
|
||||
i=0
|
||||
for sitefile in ${sites[@]}; do
|
||||
site=${sitefile##*/}; site=${site/.conf/}
|
||||
siteconfig=$(cat ${sitefile})
|
||||
if (( i % 12 == 0 )) || [ $i = 0 ]; then
|
||||
DIVIDER false yellow ${dl}
|
||||
[ ${EDIT} -eq 1 ] && msg1='##) Site Hostname' || msg1='Site Hostname'
|
||||
@@ -676,14 +676,15 @@ SITEINFO(){
|
||||
else
|
||||
DIVIDER false darkGray ${dl}
|
||||
fi
|
||||
if [ "$(grep include/proxy.conf ${sitefile})" != "" ] || [ "$(grep proxy_pass ${sitefile})" != "" ]; then
|
||||
#twofacline=$(echo "${autheliaconfig}" | grep -Fn two_factor | sort | tail -n1)
|
||||
if [ "$(echo "${siteconfig}" | grep include/proxy.conf)" != "" ] || [ "$(echo "${siteconfig}" | grep proxy_pass)" != "" ]; then
|
||||
type='Proxy'
|
||||
if [ "$(grep include/proxy.conf ${sitefile})" != "" ]; then
|
||||
server=$(grep 'set $server' ${sitefile})
|
||||
if [ "$(echo "${siteconfig}" | grep include/proxy.conf)" != "" ]; then
|
||||
server=$(echo "${siteconfig}" | grep 'set $server')
|
||||
server=${server#*\"}; server=${server%\"*}
|
||||
scheme=$(grep 'set $forward_scheme' ${sitefile})
|
||||
server=$(echo "${siteconfig}" | grep 'set $forward_scheme')
|
||||
scheme=${scheme##* }; scheme=${scheme%;*}
|
||||
port=$(grep 'set $port' ${sitefile})
|
||||
server=$(echo "${siteconfig}" | grep 'set $port')
|
||||
port=${port##* }; port=${port%;*}
|
||||
proxyhost="${scheme}://${server}:${port}"
|
||||
else
|
||||
@@ -693,15 +694,15 @@ SITEINFO(){
|
||||
type='HTTP'
|
||||
proxyhost=''
|
||||
fi
|
||||
|
||||
[ "$(grep \#ssl_certificate ${sitefile})" != "" ] && ssl='' || ssl='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'
|
||||
|
||||
if [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" == "" ]; then
|
||||
|
||||
server=$(echo "${siteconfig}" | grep 'set $port')
|
||||
|
||||
[ "$(echo "${siteconfig}" | grep \#ssl_certificate)" != "" ] && ssl='' || ssl='Yes'
|
||||
[ "$(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})
|
||||
sitefacline=${sitefacline%%:*}
|
||||
if [ "${sitefacline}" == "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user