From 73ee1a78fd50345eb5d697c71b2d04ae723d2c5d Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 7 Feb 2019 13:09:25 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 42eeac39..163359ca 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -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