Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-11 17:03:03 -06:00
parent a08ae304f9
commit 3769a52f5f

View File

@@ -760,9 +760,9 @@ DELSITE(){
echo "" echo ""
echo -e "Usage: ${idsCL[Yellow]}nodemgmt delsite${idsCL[Default]} {" echo -e "Usage: ${idsCL[Yellow]}nodemgmt delsite${idsCL[Default]} {"
width=33 width=33
printf "%-${width}s- %s\n" " -site {FQDN address}" '(*required)' printf "%-${width}s- %s\n" " -site {FQDN address}" "(*required)"
printf "%-${width}s- %s\n" " -ssl {yes or [no]}" "Delete SSL certs as well" printf "%-${width}s- %s\n" " -ssl {yes or [no]}" "Delete SSL certs as well"
printf "%-${width}s- %s\n" " -list" 'List sites (same as running nodemgmt delsites)' printf "%-${width}s- %s\n" " -list" "List sites (same as running nodemgmt delsites)"
echo "}" echo "}"
exit 1;; exit 1;;
esac esac
@@ -797,7 +797,7 @@ DELSITE(){
else else
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi
echo -en "Removing from iDS-Node${nid} \($nip\)... ${idsCL[Default]}" echo -en "Removing from iDS-Node${nid} ($nip)... ${idsCL[Default]}"
#if [ -f /etc/nginx/sites-available/${DEL_SITE} ]; then #if [ -f /etc/nginx/sites-available/${DEL_SITE} ]; then
${NCMD} rm -f /etc/nginx/sites-available/${DEL_SITE} ${NCMD} rm -f /etc/nginx/sites-available/${DEL_SITE}
${NCMD} rm -f /etc/nginx/sites-enabled/${DEL_SITE} ${NCMD} rm -f /etc/nginx/sites-enabled/${DEL_SITE}
@@ -823,7 +823,7 @@ DELSITE(){
width=33 width=33
printf "%-${width}s- %s\n" " -site {FQDN address}" "Site to delete" printf "%-${width}s- %s\n" " -site {FQDN address}" "Site to delete"
printf "%-${width}s- %s\n" " -ssl {yes or [no]}" "Delete SSL certs as well" printf "%-${width}s- %s\n" " -ssl {yes or [no]}" "Delete SSL certs as well"
printf "%-${width}s- %s\n" " -list" 'List sites (same as running nodemgmt delsites)' printf "%-${width}s- %s\n" " -list" "List sites (same as running nodemgmt delsites)"
echo "}" echo "}"
exit 1 exit 1
fi fi
@@ -903,12 +903,12 @@ NEWSITE(){
echo "" echo ""
echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {" echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {"
width=33 width=33
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)"
printf "%-${width}s- %s\n" " -ssl {yes or no}" '(defaults to yes)' printf "%-${width}s- %s\n" " -ssl {yes or no}" "(defaults to yes)"
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" " -port {host port}" '(proxy backend host)' printf "%-${width}s- %s\n" " -port {host port}" "(proxy backend host)"
printf "%-${width}s- %s\n" " -host {IP or FQDN}" '(proxy backend port)' printf "%-${width}s- %s\n" " -host {IP or FQDN}" "(proxy backend port)"
printf "%-${width}s- %s\n" " -scheme {http or https}" '(proxy backend scheme)' printf "%-${width}s- %s\n" " -scheme {http or https}" "(proxy backend scheme)"
echo "}" echo "}"
exit 1;; exit 1;;
esac esac
@@ -933,7 +933,7 @@ NEWSITE(){
fi fi
fi fi
if [ -z ${SITE_TYPE+x} ]; then if [ -z ${SITE_TYPE+x} ]; then
echo -e -n "${idsCL[LightCyan]}Site type \([local]/proxy\): ${idsCL[Default]}" echo -e -n "${idsCL[LightCyan]}Site type ([local]/proxy): ${idsCL[Default]}"
read SITE_TYPE read SITE_TYPE
showdivide=yes showdivide=yes
if [ "${SITE_TYPE}" != "proxy" ]; then if [ "${SITE_TYPE}" != "proxy" ]; then
@@ -942,17 +942,17 @@ NEWSITE(){
fi fi
if [ "${SITE_TYPE}" = "proxy" ]; then if [ "${SITE_TYPE}" = "proxy" ]; then
if [ -z ${PROXYHOST+x} ]; then if [ -z ${PROXYHOST+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend address \(IP or FQDN\): ${idsCL[Default]}" echo -e -n "${idsCL[LightCyan]}What is the proxy backend address (IP or FQDN): ${idsCL[Default]}"
read PROXYHOST read PROXYHOST
showdivide=yes showdivide=yes
fi fi
if [ -z ${PROXYPORT+x} ]; then if [ -z ${PROXYPORT+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend port \(tcp port\): ${idsCL[Default]}" echo -e -n "${idsCL[LightCyan]}What is the proxy backend port (tcp port): ${idsCL[Default]}"
read PROXYPORT read PROXYPORT
showdivide=yes showdivide=yes
fi fi
if [ -z ${PROXYSCHEME+x} ]; then if [ -z ${PROXYSCHEME+x} ]; then
echo -e -n "${idsCL[LightCyan]}What is the proxy backend scheme \(http/https\): ${idsCL[Default]}" echo -e -n "${idsCL[LightCyan]}What is the proxy backend scheme (http/https): ${idsCL[Default]}"
read PROXYSCHEME read PROXYSCHEME
showdivide=yes showdivide=yes
fi fi