Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-05 23:30:56 -06:00
parent 06cd9e105d
commit 09eb174e55

View File

@@ -324,10 +324,12 @@ NEWSITE(){
if [ -z ${NEW_SITE+x} ]; then
echo -e -n "${idsCL[LightCyan]}New site domain name: ${idsCL[Default]}"
read NEW_SITE
showdivide=yes
fi
if [ -z ${CREATE_SSL+x} ]; then
echo -e -n "${idsCL[LightCyan]}Create SSL for site? [Y/n] ${idsCL[Default]}"
read CREATE_SSL
showdivide=yes
if [[ $CREATE_SSL =~ ^[Yy]$ ]]; then
CREATE_SSL=yes
else
@@ -337,6 +339,7 @@ NEWSITE(){
if [ -z ${SITE_TYPE+x} ]; then
echo -e -n "${idsCL[LightCyan]}Site type ([local]/proxy): ${idsCL[Default]}"
read SITE_TYPE
showdivide=yes
if [ "${SITE_TYPE}" != "proxy" ]; then
SITE_TYPE=local
fi
@@ -345,19 +348,33 @@ NEWSITE(){
if [ -z ${PROXYHOST+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend address (IP or FQDN): ${idsCL[Default]}"
read PROXYHOST
fi
if [ -z ${PROXYSCHEME+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend scheme (http/https): ${idsCL[Default]}"
read PROXYSCHEME
showdivide=yes
fi
if [ -z ${PROXYPORT+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend port (tcp port): ${idsCL[Default]}"
read PROXYPORT
showdivide=yes
fi
if [ -z ${PROXYSCHEME+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend scheme (http/https): ${idsCL[Default]}"
read PROXYSCHEME
showdivide=yes
fi
fi
if [ "${NEW_SITE}" != "" ]; then
if [ "${showdivide}" = "yes" ]; then DIVIDER; fi
echo ""
width=16
printf "%-${width}s- %s\n" "New site:" "${NEW_SITE}"
printf "%-${width}s- %s\n" "Create SSL:" "${CREATE_SSL}"
printf "%-${width}s- %s\n" "Site type:" "${SITE_TYPE}"
if [ "${SITE_TYPE}" = "proxy" ]; then
printf "%-${width}s- %s\n" "Proxy host:" "${PROXYHOST}"
printf "%-${width}s- %s\n" "Proxy port:" "${PROXYPORT}"
printf "%-${width}s- %s\n" "Proxy scheme:" "${PROXYSCHEME}"
fi
echo -e -n "${idsCL[LightRed]}Is this information correct? [Y/n]${idsCL[Default]} "
read response
if [[ $response =~ ^[Yy]$ ]]; then
if [[ ${NEW_SITE} == *","* ]]; then
IFS=','; NEW_SITES=(${NEW_SITE}); unset IFS
MAIN_SITE=${NEW_SITES[0]}