Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 12:58:08 -06:00
parent 4f7860f3da
commit 25e6e77e87

View File

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