diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 62f582b7..96bd4d6d 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1286,6 +1286,9 @@ NEWSITE(){ -proxy_scheme) PROXYSCHEME=${2};; -proxy_host) PROXYHOST=${2};; -proxy_port) PROXYPORT=${2};; + -websocket) WEBSOCKET=${2};; + -hsts) HSTS=${2};; + -exploits) EXPLOITS=${2};; -h | -help | --help) echo "" echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {" @@ -1295,7 +1298,10 @@ NEWSITE(){ printf "%-${width}s- %s\n" " -type {'local' or 'proxy'}" "(defaults to local)" printf "%-${width}s- %s\n" " -proxy_port {host port}" "(proxy backend host)" printf "%-${width}s- %s\n" " -proxy_host {IP or FQDN}" "(proxy backend port)" - printf "%-${width}s- %s\n" " -sproxy_cheme {http or https}" "(proxy backend scheme)" + printf "%-${width}s- %s\n" " -proxy_scheme {http or https}" "(proxy backend scheme)" + printf "%-${width}s- %s\n" " -websocket {yes or no}" "(websocket support)" + printf "%-${width}s- %s\n" " -hsts {yes or no}" "(hsts support)" + printf "%-${width}s- %s\n" " -exploits {yes or no}" "(block exploits)" echo "}" exit 1;; esac @@ -1343,16 +1349,16 @@ NEWSITE(){ read PROXYSCHEME showdivide=yes fi - if [ -z ${WEBOSCKET+x} ]; then + if [ -z ${WEBSOCKET+x} ]; then echo -e -n "${idsCL[LightCyan]}Enable Websocket Support (y/N): ${idsCL[Default]}" - read WEBOSCKET + read WEBSOCKET showdivide=yes - if [[ ${WEBOSCKET} =~ ^[Nn]$ ]] || [ "${WEBOSCKET}" = "" ]; then - WEBOSCKET=no - elif [[ ${WEBOSCKET} =~ ^[Yy]$ ]]; then - WEBOSCKET=yes + if [[ ${WEBSOCKET} =~ ^[Nn]$ ]] || [ "${WEBSOCKET}" = "" ]; then + WEBSOCKET=no + elif [[ ${WEBSOCKET} =~ ^[Yy]$ ]]; then + WEBSOCKET=yes else - WEBOSCKET=no + WEBSOCKET=no fi fi if [ -z ${HSTS+x} ]; then @@ -1388,7 +1394,7 @@ NEWSITE(){ printf "%-${width}s: %s\n" "Proxy host" "${PROXYHOST}" printf "%-${width}s: %s\n" "Proxy port" "${PROXYPORT}" printf "%-${width}s: %s\n" "Proxy scheme" "${PROXYSCHEME}" - printf "%-${width}s: %s\n" "Websocket Support" "${WEBOSCKET}" + printf "%-${width}s: %s\n" "Websocket Support" "${WEBSOCKET}" printf "%-${width}s: %s\n" "HSTS Support" "${HSTS}" printf "%-${width}s: %s\n" "Block Exploits" "${EXPLOITS}" fi @@ -1480,7 +1486,7 @@ NEWSITE(){ ######################################### PROXY else - [ "${WEBSOCKET}" == "yes" ] && WEBSOCKET="include conf.d/include/websocket-support.conf;" || WEBSOCKET="" + [ "${WEBSOCKET}" == "yes" ] && WEBSOCKET="include conf.d]\/include\/websocket-support.conf;" || WEBSOCKET="" [ "${HSTS}" == "yes" ] && HSTS="include conf.d\/include\/hsts-support.conf;" || HSTS="" [ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS=""