Update nodemgmt-scripts.sh
This commit is contained in:
@@ -94,6 +94,7 @@ NIGHTLYRENEW(){
|
||||
}
|
||||
|
||||
DELSITE(){
|
||||
if [ ! -z ${1+x} ]; then
|
||||
DEL_SITE=${1}
|
||||
echo -e "${idsCL[LightRed]}Deleting site '${idsCL[Red]}${DEL_SITE}${idsCL[LightRed]}'...${idsCL[Default]}"
|
||||
echo ""
|
||||
@@ -111,18 +112,27 @@ DELSITE(){
|
||||
NCMD="ssh root@${nip}"
|
||||
fi
|
||||
echo -en "Removing from iDS-Node${nid} ($nip)... ${idsCL[Default]}"
|
||||
if [ -f /etc/nginx/sites-available/${DEL_SITE}.conf ]; then
|
||||
${NCMD} rm -f /etc/nginx/sites-available/${DEL_SITE}.conf
|
||||
${NCMD} rm -f /etc/nginx/sites-enabled/${DEL_SITE}.conf
|
||||
fi
|
||||
if [ -d /var/www/${DEL_SITE} ]; then
|
||||
${NCMD} rm -rf /var/www/${DEL_SITE}
|
||||
fi
|
||||
if [ -d /etc/letsencrypt/archive/${DEL_SITE} ]; 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
|
||||
fi
|
||||
echo -e "${idsCL[Green]}OK${idsCL[Default]}"
|
||||
nid=`expr $nid + 1`
|
||||
done
|
||||
echo ""
|
||||
${FOLDER}/nodemgmt-scripts.sh service nginx reload
|
||||
echo -e "${idsCL[LightRed]}Site has been deleted.${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[LightRed]}No site was defined.${idsCL[Default]}"
|
||||
fi
|
||||
}
|
||||
|
||||
NEWSITE(){
|
||||
|
||||
Reference in New Issue
Block a user