From f14ec82a9c59e2c6ece97cd21b905c816c589408 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 26 Mar 2019 23:53:58 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 71391923..b83bce04 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1404,19 +1404,13 @@ KEEPALIVE-CONFIG() { NODEUPDATE() { echo -e "${idsCL[LightGreen]}Updating All Nodes and Webservers${idsCL[Default]}" echo -e "${idsCL[LightGreen]}-------------------------------------------${idsCL[Default]}" - if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${MYSQLMANAGER}"* ]]; then - nip='localhost ' - NCMD='ssh root@localhost' - else + if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *"${MYSQLMANAGER}"* ]]; then nip=${MYSQLMANAGER} - NCMD="ssh root@${MYSQLMANAGER}" + echo -en "Updating MySQL-Manager ($nip )... ${idsCL[Default]}" + ssh root@${MYSQLMANAGER} "nodemgmt update q" + echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}" + echo fi - echo -en "Updating MySQL-Manager ($nip )... ${idsCL[Default]}" - ${NCMD} "nodemgmt update q" - echo -e "${idsCL[Green]}COMPLETE${idsCL[Default]}" - echo - - for NTYPE in "${NODE_TYPES[@]}"; do nid=1 var=${NTYPE}_HOSTS[@]