Update nodemgmt-scripts.sh

This commit is contained in:
2019-03-25 12:15:19 -05:00
parent 3091c9623e
commit eebb52b399

View File

@@ -1651,11 +1651,12 @@ NODEUPDATE() {
echo -en "Updating MySQL-Manager ($nip)... ${idsCL[Default]}" echo -en "Updating MySQL-Manager ($nip)... ${idsCL[Default]}"
${NCMD} "nodemgmt update q" ${NCMD} "nodemgmt update q"
echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}" echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}"
echo
nid=1 nid=1
for nip in "${NODE_HOSTS[@]}"; do for nip in "${NODE_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
nip='localhost ' nip='localhost '
NCMD='' NCMD='ssh root@localhost'
else else
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi
@@ -1669,7 +1670,7 @@ NODEUPDATE() {
for nip in "${LB_HOSTS[@]}"; do for nip in "${LB_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
nip='localhost ' nip='localhost '
NCMD='' NCMD='ssh root@localhost'
else else
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi
@@ -1683,7 +1684,7 @@ NODEUPDATE() {
for nip in "${WEB_HOSTS[@]}"; do for nip in "${WEB_HOSTS[@]}"; do
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
nip='localhost ' nip='localhost '
NCMD='' NCMD='ssh root@localhost'
else else
NCMD="ssh root@${nip}" NCMD="ssh root@${nip}"
fi fi