Update test.sh

This commit is contained in:
2019-02-01 19:33:01 -06:00
parent 00fe713c00
commit 167452973f

12
test.sh
View File

@@ -29,9 +29,17 @@ while [ $# -gt 0 ]; do
-proxy_host) PROXYHOST=${2}; echo "PROXYHOST - ${PROXYHOST}" ;; -proxy_host) PROXYHOST=${2}; echo "PROXYHOST - ${PROXYHOST}" ;;
-proxy_port) PROXYPORT=${2}; echo "PROXYPORT - ${PROXYPORT}" ;; -proxy_port) PROXYPORT=${2}; echo "PROXYPORT - ${PROXYPORT}" ;;
-*) -*)
echo "Invalid option: '${OPTARG}' requires an argument" 1>&2 echo "Invalid option: '${1}' requires an argument" 1>&2
echo "" 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" " -site {FQDN address}" "(*required)"
printf "%-${width}s: %s\n" " -ssl {true or false}" "(defaults to true)"
printf "%-${width}s: %s\n" " -type {'local' or 'proxy'}" "(defaults to local)"
printf "%-${width}s: %s\n" " -scheme {http or https}" "(required if type set to proxy)"
printf "%-${width}s: %s\n" " -host {IP or FQDN}" "(required if type set to proxy)"
printf "%-${width}s: %s\n" " -port {host port}" "(required if type set to proxy)"
echo "}"
exit 1;; exit 1;;
#*) break;; #*) break;;
esac esac