From cf15ebb58b239428dd41a2b95262dc3ed4ccea22 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 1 Feb 2019 19:04:41 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 9a1f480d..a98b2a8c 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -69,7 +69,7 @@ case "$1" in ;; newsite) - while getopts ':site:type:ssl:proxy_scheme:proxy_host:proxy_port:' flag; do + while getopts ':d:t:s:S:H:P:' flag; do case "${flag}" in d) NEW_SITE=$OPTARG ;; t) SITE_TYPE=$OPTARG ;; @@ -80,7 +80,15 @@ case "$1" in :) echo "Invalid option: '${OPTARG}' requires an argument" 1>&2 echo "" - echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} { ${idsCL[Yellow]}-site${idsCL[Default]} {domain address} | ${idsCL[Yellow]}-type${idsCL[Default]} {'local' or 'proxy'} | ${idsCL[ Yellow]}-ssl${idsCL[Default]} {true or false} | ${idsCL[Yellow]}certrenew${idsCL[Default]} | ${idsCL[ Yellow]}-proxy_scheme${idsCL[Default]} {http or https} | ${idsCL[ Yellow]}-proxy_host${idsCL[Default]} {IP or FQDN} | ${idsCL[ Yellow]}-proxy_port${idsCL[Default]} {host port} }" + echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {" + width=36 + printf "%-${width}s: %s\n" " -d {FQDN address}" "(*required)" + printf "%-${width}s: %s\n" " -s {true or false}" "(defaults to true)" + printf "%-${width}s: %s\n" " -t {'local' or 'proxy'}" "(defaults to local)" + printf "%-${width}s: %s\n" " -S {http or https}" "(required if type set to proxy)" + printf "%-${width}s: %s\n" " -H {IP or FQDN}" "(required if type set to proxy)" + printf "%-${width}s: %s\n" " -P {host port}" "(required if type set to proxy)" + echo "}" ;; esac done @@ -186,8 +194,8 @@ case "$1" in echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} {" width=36 printf "%-${width}s: %s\n" " -d {FQDN address}" "(*required)" - printf "%-${width}s: %s\n" " -t {'local' or 'proxy'}" "(defaults to local)" printf "%-${width}s: %s\n" " -s {true or false}" "(defaults to true)" + printf "%-${width}s: %s\n" " -t {'local' or 'proxy'}" "(defaults to local)" printf "%-${width}s: %s\n" " -S {http or https}" "(required if type set to proxy)" printf "%-${width}s: %s\n" " -H {IP or FQDN}" "(required if type set to proxy)" printf "%-${width}s: %s\n" " -P {host port}" "(required if type set to proxy)"