Update nodemgmt-scripts.sh
This commit is contained in:
@@ -1286,6 +1286,9 @@ NEWSITE(){
|
|||||||
-proxy_scheme) PROXYSCHEME=${2};;
|
-proxy_scheme) PROXYSCHEME=${2};;
|
||||||
-proxy_host) PROXYHOST=${2};;
|
-proxy_host) PROXYHOST=${2};;
|
||||||
-proxy_port) PROXYPORT=${2};;
|
-proxy_port) PROXYPORT=${2};;
|
||||||
|
-websocket) WEBSOCKET=${2};;
|
||||||
|
-hsts) HSTS=${2};;
|
||||||
|
-exploits) EXPLOITS=${2};;
|
||||||
-h | -help | --help)
|
-h | -help | --help)
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {"
|
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" " -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_port {host port}" "(proxy backend host)"
|
||||||
printf "%-${width}s- %s\n" " -proxy_host {IP or FQDN}" "(proxy backend port)"
|
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 "}"
|
echo "}"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
@@ -1343,16 +1349,16 @@ NEWSITE(){
|
|||||||
read PROXYSCHEME
|
read PROXYSCHEME
|
||||||
showdivide=yes
|
showdivide=yes
|
||||||
fi
|
fi
|
||||||
if [ -z ${WEBOSCKET+x} ]; then
|
if [ -z ${WEBSOCKET+x} ]; then
|
||||||
echo -e -n "${idsCL[LightCyan]}Enable Websocket Support (y/N): ${idsCL[Default]}"
|
echo -e -n "${idsCL[LightCyan]}Enable Websocket Support (y/N): ${idsCL[Default]}"
|
||||||
read WEBOSCKET
|
read WEBSOCKET
|
||||||
showdivide=yes
|
showdivide=yes
|
||||||
if [[ ${WEBOSCKET} =~ ^[Nn]$ ]] || [ "${WEBOSCKET}" = "" ]; then
|
if [[ ${WEBSOCKET} =~ ^[Nn]$ ]] || [ "${WEBSOCKET}" = "" ]; then
|
||||||
WEBOSCKET=no
|
WEBSOCKET=no
|
||||||
elif [[ ${WEBOSCKET} =~ ^[Yy]$ ]]; then
|
elif [[ ${WEBSOCKET} =~ ^[Yy]$ ]]; then
|
||||||
WEBOSCKET=yes
|
WEBSOCKET=yes
|
||||||
else
|
else
|
||||||
WEBOSCKET=no
|
WEBSOCKET=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z ${HSTS+x} ]; then
|
if [ -z ${HSTS+x} ]; then
|
||||||
@@ -1388,7 +1394,7 @@ NEWSITE(){
|
|||||||
printf "%-${width}s: %s\n" "Proxy host" "${PROXYHOST}"
|
printf "%-${width}s: %s\n" "Proxy host" "${PROXYHOST}"
|
||||||
printf "%-${width}s: %s\n" "Proxy port" "${PROXYPORT}"
|
printf "%-${width}s: %s\n" "Proxy port" "${PROXYPORT}"
|
||||||
printf "%-${width}s: %s\n" "Proxy scheme" "${PROXYSCHEME}"
|
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" "HSTS Support" "${HSTS}"
|
||||||
printf "%-${width}s: %s\n" "Block Exploits" "${EXPLOITS}"
|
printf "%-${width}s: %s\n" "Block Exploits" "${EXPLOITS}"
|
||||||
fi
|
fi
|
||||||
@@ -1480,7 +1486,7 @@ NEWSITE(){
|
|||||||
|
|
||||||
######################################### PROXY
|
######################################### PROXY
|
||||||
else
|
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=""
|
[ "${HSTS}" == "yes" ] && HSTS="include conf.d\/include\/hsts-support.conf;" || HSTS=""
|
||||||
[ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS=""
|
[ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS=""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user