Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-11 16:55:34 -06:00
parent b1a6f949b0
commit eef2a0c0b9

View File

@@ -511,13 +511,14 @@ DEL-SSL(){
DEL_SSL=${1} DEL_SSL=${1}
fi fi
if [ ! -z ${DEL_SSL+x} ] && [ "${DEL_SSL}" != "" ]; then if [ ! -z ${DEL_SSL+x} ] && [ "${DEL_SSL}" != "" ]; then
if [ -d /etc/letsencrypt/live/${DEL_SSL} ]"; then
echo -e "${idsCL[LightRed]}Deleting the SSL 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]}"
# rm -rf /etc/letsencrypt/archive/${DEL_SITE} rm -rf /etc/letsencrypt/archive/${DEL_SITE}
# rm -rf /etc/letsencrypt/live/${DEL_SITE} rm -rf /etc/letsencrypt/live/${DEL_SITE}
# rm -f /etc/letsencrypt/renewal/${DEL_SITE}.conf rm -f /etc/letsencrypt/renewal/${DEL_SITE}.conf
echo -e "${idsCL[Green]}OK${idsCL[Default]}" echo -e "${idsCL[Green]}OK${idsCL[Default]}"
echo "" echo ""
echo -en "${idsCL[LightYellow]}Waiting for certificate replication between the nodes... ${idsCL[Default]}" echo -en "${idsCL[LightYellow]}Waiting for certificate replication between the nodes... ${idsCL[Default]}"
@@ -530,7 +531,7 @@ DEL-SSL(){
else NCMD="ssh root@${nip}" else NCMD="ssh root@${nip}"
fi fi
if [ "${NCMD}" != "" ]; then if [ "${NCMD}" != "" ]; then
if ${NCMD} "[ -d /etc/letsencrypt/live/${DEL_SITE} ]"; then if ${NCMD} "[ -d /etc/letsencrypt/live/${DEL_SSL} ]"; then
tchecked+=false tchecked+=false
else else
tchecked+='' tchecked+=''
@@ -544,6 +545,10 @@ DEL-SSL(){
break break
fi fi
done done
else
echo -e "${idsCL[LightRed]}The SSL files folder for '${idsCL[Red]}${DEL_SSL}${idsCL[LightRed]}' could not be found.${idsCL[Default]}"
exit 1
fi
if [ "${timeout}" != "true" ]; then if [ "${timeout}" != "true" ]; then
echo -e "${idsCL[Green]}Completed${idsCL[Default]}" echo -e "${idsCL[Green]}Completed${idsCL[Default]}"
fi fi