From 986a091e99076b32265101eadb7e1ac89fe06b20 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 25 Jul 2019 23:34:47 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d589ab55..2e89cf05 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -790,16 +790,16 @@ DELSITES(){ echo -e "${idsCL[Red]}Select a site to delete...${idsCL[Default]}" DIVIDER true sid=1 - filels="( $(ssh root@10.5.10.121 ls '/etc/nginx/sites-available/*') )" + filels="( $(ssh root@${WEB_HOSTS[0]} ls '/etc/nginx/sites-available/*') )" # IFS='\n' for siteconf in $filels; do # for siteconf in /etc/nginx/sites-available/* ; do - # echo "HERE: $siteconf" # [ -e "$siteconf" ] || continue - echo "HERE: $siteconf" - IFS='/'; site_conf=(${siteconf}); unset IFS - SITES[${sid}]=${site_conf[4]} - sid=`expr $sid + 1` + if [ ${siteconf[0]} = '/']; then + IFS='/'; site_conf=(${siteconf}); unset IFS + SITES[${sid}]=${site_conf[4]} + sid=`expr $sid + 1` + fi done for s in "${!SITES[@]}"; do echo " [${s}] ${SITES[${s}]}"