Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 13:09:25 -06:00
parent 9843dad47f
commit 73ee1a78fd

View File

@@ -98,7 +98,6 @@ STATUS() {
echo -e "${idsST[Bold]}"; DIVIDER
echo -e "${idsCL[Yellow]} Replication Status Between the Primary and Secondary Nodes${idsCL[Default]}"
DIVIDER; echo -e "${idsST[Reset]}"
timeout=`date --date='5 seconds' +%s`
nid=1
for nip in "${NODE_HOSTS[@]}"
do
@@ -110,6 +109,7 @@ STATUS() {
do
c=0; cw=22; spc=''
spc1=${cw}-${#REPL_DESC[${rcheck}]}
timeout=`date --date='5 seconds' +%s`
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en " ${REPL_DESC[${rcheck}]}${spc}: "
checked=false
@@ -119,8 +119,8 @@ STATUS() {
else
checked="`ssh root@10.5.10.51 \"ssh root@${nip} \"cat ${REPL_CHECKS[${rcheck}]}/test.repl\" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl\"`"
fi
cdate=`date +%s`
if [ "${cdate}" -gt "$timeout" ]; then
#cdate=`date +%s`
if [ "`date +%s`" -gt "$timeout" ]; then
timeout=true
break
fi