diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 1220970d..608c4eab 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -88,7 +88,7 @@ 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='30 seconds' +%s` + timeout=`date --date='5 seconds' +%s` nid=1 for nip in "${NODE_HOSTS[@]}" do @@ -114,12 +114,12 @@ STATUS() { break fi done - if [ "${timeout}" = "true" ]; then - echo -e "${idsCL[Red]}Timeout${idsCL[Default]}" - touch ${FOLDER}/${nip}-${rcheck}.down - else + if [ "${timeout}" != "true" ]; then echo -e "${idsCL[Green]}Good${idsCL[Default]}" rm -f ${FOLDER}/${nip}-${rcheck}.down + else + echo -e "${idsCL[Red]}Timeout${idsCL[Default]}" + touch ${FOLDER}/${nip}-${rcheck}.down fi done echo