From f15f275639cd3adb996f4bb52159cb2f4b9f90a7 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 11 Feb 2019 16:51:41 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index ef78c12b..c6427eba 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -503,15 +503,15 @@ NEWCERT(){ } DEL-SSL(){ - echo 'yes' - DEL_SSL=${2} - if [ -z ${DEL_SSL+x} ]; then + if [ -z ${2+x} ]; then echo -e -n "${idsCL[LightCyan]}Delete what SSL site address: ${idsCL[Default]}" read DEL_SSL echo "" + else + DEL_SSL=${2} fi if [ ! -z ${DEL_SSL+x} ] && [ "${DEL_SSL}" != "" ]; then - echo -e "${idsCL[LightRed]}Deleting theb certificates for '${idsCL[Red]}${DEL_SSL}${idsCL[LightRed]}'...${idsCL[Default]}" + echo -e "${idsCL[LightRed]}Deleting the SSL certificates for '${idsCL[Red]}${DEL_SSL}${idsCL[LightRed]}'...${idsCL[Default]}" echo "" echo -en "${idsCL[LightRed]}Removing Files and Folders... ${idsCL[Default]}" @@ -550,16 +550,6 @@ DEL-SSL(){ echo SERVICE nginx reload echo -e "${idsCL[LightRed]}The SSL certificate has been removed fromt be nodes.${idsCL[Default]}" - else - echo "Missing arguments" - echo "" - echo -e "Usage: ${idsCL[Yellow]}nodemgmt delsite${idsCL[Default]} {" - width=33 - 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" " -list" "List sites (same as running nodemgmt delsites)" - echo "}" - exit 1 fi }