Update nodemgmt-scripts.sh

This commit is contained in:
2019-10-01 23:42:36 -05:00
parent 6501ac3aaa
commit 7cbbd46f51

View File

@@ -1374,11 +1374,14 @@ NODEUPDATE() {
echo -e "${idsCL[LightGreen]}Updating All Nodes and Webservers${idsCL[Default]}"
echo -e "${idsCL[LightGreen]}-------------------------------------------${idsCL[Default]}"
nip=${MYSQLMANAGER}
if [[ $(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then
nip='localhost '
fi
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"
ssh root@${nip} "nodemgmt update q"
c=0; cw=13; spc=''
spc1=${cw}-${#nip}
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
@@ -1390,10 +1393,8 @@ NODEUPDATE() {
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'
else
NCMD="ssh root@${nip}"
fi
NCMD="ssh root@${nip}"
c=0; cw=15; spc=''
spc1=${cw}-${#NM_NODETYPES[$NTYPE]}
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done