diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 1965f6af..ffe64a2f 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -220,34 +220,20 @@ DELSITE(){ DELSITES(){ echo -e "${idsCL[Green]}Select a site to delete...${idsCL[Default]}" DIVIDER true - - while : do - echo " [1] Node Status" - + sid=1 + for siteconf in /etc/nginx/sites-available/* ; do + IFS='/'; site_conf=(${siteconf}); unset IFS + echo " [${sid}] ${site_conf[4]}" + sid=`expr $sid + 1` + done echo "" echo " [Q] Quit" echo "" echo "" - echo -e -n "${idsCL[LightYellow]}Please select an [ActionItem] from above:${idsCL[Default]} " - read -n 1 opt - echo "" - case $opt in - 1) STATUS; GUI;; - 2) GUI;; - 3) GUI;; - 4) GUI;; - 5) GUI;; - 6) CERTRENEW; GUI;; - 7) LISTCERTS; GUI;; - 8) SET-PERMISSIONS; GUI;; - [Bb]) GUI;; - [Qq]) EXIT1;exit 0;; - *) echo "Thats an invaild option,"; - echo "please select a valid option only."; - sleep 1;; - esac + echo -e -n "${idsCL[LightYellow]}Please select a site from above from above:${idsCL[Default]} " + read -n 2 opt done }