Update sites.inc

This commit is contained in:
2023-11-14 17:16:32 -06:00
parent ba705d8e23
commit 08a17456ca

View File

@@ -137,30 +137,6 @@ DELSITES(){
fi
}
LISTSITES(){
echo
echo -e "${idsCL[Red]}NGINX Site Config...${idsCL[Default]}"
DIVIDER true
# filels="( $(ssh root@${NM_HOSTS['LB'][0]} ls ${NM_NGINXPATH}/sites-enabled/*) )"
filels="( $(ls ${NM_NGINXPATH}/sites-enabled/*) )"
for siteconf in $filels; do
if [ ${siteconf:0:1} == '/' ]; then
IFS='/'; site_conf=(${siteconf}); unset IFS
[ "${site_conf[3]}" == "sites-enabled" ] && SITENAME=${site_conf[4]/.conf/} || [ "${site_conf[4]}" == "sites-enabled" ] && SITENAME=${site_conf[5]/.conf/}
[ grep -q "secure-access.conf" ${siteconf} ] && SECURE=Yes || SECURE=No
[ grep -q "websocket-support.conf" ${siteconf} ] && WEBSOCKET=Yes || WEBSOCKET=No
[ grep -q "hsts-support.conf" ${siteconf} ] && HSTS=Yes || HSTS=No
[ grep -q "block-exploits.conf" ${siteconf} ] && EXPLOITS=Yes || EXPLOITS=No
echo -e "${SITENAME} - ${SECURE} - ${WEBSOCKET} - ${HSTS} - ${EXPLOITS}"
fi
done
if [ -z $action ] || [ "${action}" = "gui" ]; then
ENTER2CONTINUE
fi
}
NEWSITE(){
CERTTEST=0
echo
@@ -178,7 +154,6 @@ NEWSITE(){
-exploits) EXPLOITS=${2};;
-secure) SECURE=${2};;
-h | -help | --help)
echo
echo -e "Usage: ${idsCL[LightYellow]}[nodemgmt or nmg] newsite ${idsCL[Yellow]}{flags}${idsCL[Default]} {"
width=35
printf "%-${width}s- %s\n" " -site {FQDN address(,es)}" "(new site and aliases, comma separated)"