Update sites.inc
This commit is contained in:
@@ -137,30 +137,6 @@ DELSITES(){
|
|||||||
fi
|
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(){
|
NEWSITE(){
|
||||||
CERTTEST=0
|
CERTTEST=0
|
||||||
echo
|
echo
|
||||||
@@ -178,7 +154,6 @@ NEWSITE(){
|
|||||||
-exploits) EXPLOITS=${2};;
|
-exploits) EXPLOITS=${2};;
|
||||||
-secure) SECURE=${2};;
|
-secure) SECURE=${2};;
|
||||||
-h | -help | --help)
|
-h | -help | --help)
|
||||||
echo
|
|
||||||
echo -e "Usage: ${idsCL[LightYellow]}[nodemgmt or nmg] newsite ${idsCL[Yellow]}{flags}${idsCL[Default]} {"
|
echo -e "Usage: ${idsCL[LightYellow]}[nodemgmt or nmg] newsite ${idsCL[Yellow]}{flags}${idsCL[Default]} {"
|
||||||
width=35
|
width=35
|
||||||
printf "%-${width}s- %s\n" " -site {FQDN address(,es)}" "(new site and aliases, comma separated)"
|
printf "%-${width}s- %s\n" " -site {FQDN address(,es)}" "(new site and aliases, comma separated)"
|
||||||
|
|||||||
Reference in New Issue
Block a user