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