Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-11 16:51:41 -06:00
parent c19c3f743c
commit f15f275639

View File

@@ -503,15 +503,15 @@ NEWCERT(){
} }
DEL-SSL(){ DEL-SSL(){
echo 'yes' if [ -z ${2+x} ]; then
DEL_SSL=${2}
if [ -z ${DEL_SSL+x} ]; then
echo -e -n "${idsCL[LightCyan]}Delete what SSL site address: ${idsCL[Default]}" echo -e -n "${idsCL[LightCyan]}Delete what SSL site address: ${idsCL[Default]}"
read DEL_SSL read DEL_SSL
echo "" echo ""
else
DEL_SSL=${2}
fi fi
if [ ! -z ${DEL_SSL+x} ] && [ "${DEL_SSL}" != "" ]; then 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 ""
echo -en "${idsCL[LightRed]}Removing Files and Folders... ${idsCL[Default]}" echo -en "${idsCL[LightRed]}Removing Files and Folders... ${idsCL[Default]}"
@@ -550,16 +550,6 @@ DEL-SSL(){
echo echo
SERVICE nginx reload SERVICE nginx reload
echo -e "${idsCL[LightRed]}The SSL certificate has been removed fromt be nodes.${idsCL[Default]}" 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 fi
} }