From 28f1123235d187c4ea94e2696f569fc30ad5484f Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Mar 2019 13:16:07 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 33985941..60c5a26b 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -39,7 +39,7 @@ STATUS(){ # if [ ! -z ${LOCAL_SERVICES+x} ]; then NHCMD="ssh root@${NODE_HOSTS[0]}" WHCMD="ssh root@${WEB_HOSTS[0]}" - echo "HERE: '${NHCMD}' '${WHCMD}'" + # echo "HERE: '${NHCMD}' '${WHCMD}'" # else # NHCMD='' # fi @@ -321,8 +321,7 @@ STATUS(){ fi nid=1 for nip in "${NODE_HOSTS[@]}"; do - if [ "${nip}" = "${NODE_HOSTS[0]}" ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi - if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${nip}" = "${NODE_HOSTS[0]}" ]; then if [ "${ST_ACTION}" != "check" ]; then echo -e " ${idsCL[LightCyan]}MySQL-Node1 (${NODE_HOSTS[0]}) <--> ${idsST[Bold]}MySQL-Node${nid} (${nip})${idsST[Reset]}${idsCL[Default]}" DIVIDER false green @@ -387,8 +386,7 @@ STATUS(){ done nid=1 for nip in "${WEB_HOSTS[@]}"; do - if [ "${nip}" = "${WEB_HOSTS[0]}" ] && [ ! -z ${LOCAL_SERVICES+x} ]; then isreplhost=true; else isreplhost=false; fi - if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${isreplhost}" = "false" ]; then + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${nip}"* ]] && [ "${nip}" = "${WEB_HOSTS[0]}" ]; then if [ "${ST_ACTION}" != "check" ]; then echo -e " ${idsCL[LightCyan]}Webserver-Node1 (${WEB_HOSTS[0]}) <--> ${idsST[Bold]}Webserver-Node${nid} (${nip})${idsST[Reset]}${idsCL[Default]}" DIVIDER false green