Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-07 10:10:54 -06:00
parent 36d17e4142
commit a9b82f2506

View File

@@ -18,6 +18,7 @@ source /opt/idssys/nodemgmt/defaults.inc
# ========================================================= #
STATUS() {
echo
echo -e "${idsCL[Yellow]} Node Service Status${idsCL[Default]}"
DIVIDER
if [ ! -z ${LOCAL_SERVICES+x} ]; then
@@ -76,23 +77,27 @@ STATUS() {
c=0; cw=20; spc=''
spc1=${cw}-${#SUBJECT}
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${REPL_DESC[${rcheck}]}${spc}: "
checked=false
until [ "${checked}" = "" ]; do
checked=`ssh root@${nip} "cat ${REPL_CHECKS[${rcheck}]}/test.repl" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl`
if [ "`date +%s`" -gt "$timeout" ]; then
if [ "${STATUS_CHECK_EMAIL}" != "" ]; then
echo "Timeout occurred in waiting for replication between nodes." | mail -s "Status-Check" ${STATUS_CHECK_EMAIL}
fi
timeout=true
break
fi
done
if [ "${timeout}" = "true" ]; then
echo -e "${idsCL[Red]}Timeout${idsCL[Default]}"
else
echo -e "${idsCL[Green]}Good${idsCL[Default]}"
fi
echo "${rcheck} - ${REPL_DESC[${rcheck}]} - ${REPL_CHECKS[${rcheck}]}"
# echo -en "${REPL_DESC[${rcheck}]}${spc}: "
# checked=false
# until [ "${checked}" = "" ]; do
# checked=`ssh root@${nip} "cat ${REPL_CHECKS[${rcheck}]}/test.repl" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl`
# if [ "`date +%s`" -gt "$timeout" ]; then
# if [ "${STATUS_CHECK_EMAIL}" != "" ]; then
# echo "Timeout occurred in waiting for replication between nodes." | mail -s "Status-Check" ${STATUS_CHECK_EMAIL}
# fi
# timeout=true
# break
# fi
# done
# if [ "${timeout}" = "true" ]; then
# echo -e "${idsCL[Red]}Timeout${idsCL[Default]}"
# else
# echo -e "${idsCL[Green]}Good${idsCL[Default]}"
# fi
done
fi
echo