diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 7760208d..daf00a79 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1373,26 +1373,14 @@ NODEUPDATE() { declare -i cw; declare -i spc1; declare -i c 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=${MYSQLMANAGER} - c=0; cw=15; spc='' - spc1=${cw}-7 - until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -en "Updating MySQL-Manager${spc}($nip)...${idsCL[Default]}" - ssh root@${MYSQLMANAGER} "nodemgmt update q" - c=0; cw=13; spc='' - spc1=${cw}-${#nip} - until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -e "${spc}${idsCL[Green]}COMPLETE${idsCL[Default]}" - echo - fi + for NTYPE in "${NODE_TYPES[@]}"; do nid=1 var=${NTYPE}_HOSTS[@] for nip in "${!var}"; do if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then nip='localhost ' - NCMD='ssh root@localhost' + NCMD='' else NCMD="ssh root@${nip}" fi