Update nodemgmt-scripts.sh

This commit is contained in:
2019-03-06 13:16:07 -06:00
parent 36dc39913d
commit 28f1123235

View File

@@ -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