Update nodemgmt-scripts.sh

This commit is contained in:
2023-12-12 10:14:56 -06:00
parent 9678a0e43e
commit 74b8a26ddb

View File

@@ -817,30 +817,28 @@ MAINTENANCE_MODE(){
## REPLICATION CHECK
########################
if [ "${STATUS_ACTION}" == "repl" ] || [ "${STATUS_ACTION}" == "" ] || ([ "${STATUS_ACTION}" == "report" ] && [ ${REPLRUN} -eq 1 ]); then
if ([ "${STATUS_ACTION}" == "repl" ] || [ "${STATUS_ACTION}" == "" ]) && [ ! -z ${!repls+x} ]; then
if [ "${MM_ACTION}" != "check" ]; then
[ "${MM_ACTION}" == "" ] && [ "${NM_REPL_CHECK[${NTYPE}]}" != "" ] && echo
echo -e "${idsCL[Green]} Replication Check(s)${idsCL[Default]}"
echo -e "${idsCL[Green]}${NM_NODETYPES[${NTYPE}]} Replication Check(s)${idsCL[Default]}"
DIVIDER . green 52
fi
PH=${NTYPE}_HOSTS[0]
PH_CMD="ssh root@${!PH}"
if [ ! -z ${!repls+x} ]; then
var2=${NTYPE}_HOSTS[@]
for nip in "${!hosts}"; do
echo -e " ${idsCL[LightCyan]}${NM_HOSTNAMES[${!PH}]}[${!PH}] <--> ${idsST[Bold]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}"
DIVIDER false green
for rcheck in "${!repls}"; do
if [ ${item_number} -lt 10 ]; then isel=" ${item_number})"; elif [ ${item_number} -lt 100 ]; then isel=" ${item_number})"; else isel="${item_number})"; fi
c=0; spc=''; spc1=`expr ${PRI_CW} - ${#NM_REPL_DESC[${rcheck}]}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${isel} ${idsCL[White]}${NM_REPL_DESC[${rcheck}]}${spc}${idsCL[Default]}: "
var2=${NTYPE}_HOSTS[@]
for nip in "${!hosts}"; do
echo -e " ${idsCL[LightCyan]}${NM_HOSTNAMES[${!PH}]}[${!PH}] <--> ${idsST[Bold]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}"
DIVIDER false green
for rcheck in "${!repls}"; do
if [ ${item_number} -lt 10 ]; then isel=" ${item_number})"; elif [ ${item_number} -lt 100 ]; then isel=" ${item_number})"; else isel="${item_number})"; fi
c=0; spc=''; spc1=`expr ${PRI_CW} - ${#NM_REPL_DESC[${rcheck}]}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${isel} ${idsCL[White]}${NM_REPL_DESC[${rcheck}]}${spc}${idsCL[Default]}: "
echo -e "${idsCL[LightGreen]}here${idsCL[Default]}"
((item_number++))
done
echo
echo -e "${idsCL[LightGreen]}here${idsCL[Default]}"
((item_number++))
done
fi
echo
done
fi
done