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