Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-06 12:32:21 -06:00
parent ac198625cb
commit d20401e7f5

View File

@@ -223,7 +223,7 @@ DELSITE(){
read DEL_SITE
echo ""
fi
if [ ! -z ${DEL_SITE+x} ]; then
if [ ! -z ${DEL_SITE+x} ] && [ "${DEL_SITE}" != "" ]; then
echo -e "${idsCL[LightRed]}Deleting site '${idsCL[Red]}${DEL_SITE}${idsCL[LightRed]}'...${idsCL[Default]}"
echo ""
@@ -240,14 +240,14 @@ DELSITE(){
NCMD="ssh root@${nip}"
fi
echo -en "Removing from iDS-Node${nid} ($nip)... ${idsCL[Default]}"
if [ -f /etc/nginx/sites-available/${DEL_SITE} ]; then
#if [ -f /etc/nginx/sites-available/${DEL_SITE} ]; then
${NCMD} rm -f /etc/nginx/sites-available/${DEL_SITE}
${NCMD} rm -f /etc/nginx/sites-enabled/${DEL_SITE}
fi
if [ -d /var/www/${DEL_SITE} ]; then
#fi
#if [ -d /var/www/${DEL_SITE} ]; then
${NCMD} rm -rf /var/www/${DEL_SITE}
fi
if [ "${DEL_SSL}" = "yes" ] && [ -d /etc/letsencrypt/archive/${DEL_SITE} ]; then
#fi
if [ "${DEL_SSL}" = "yes" ]; then
${NCMD} rm -rf /etc/letsencrypt/archive/${DEL_SITE}
${NCMD} rm -rf /etc/letsencrypt/live/${DEL_SITE}
${NCMD} rm -f /etc/letsencrypt/renewal/${DEL_SITE}.conf