From 3b50ad220eb235c00963e133760a83b301822420 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 10 May 2025 12:01:11 -0500 Subject: [PATCH] Update status.inc --- inc/status.inc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/inc/status.inc b/inc/status.inc index 63d3106d..89fe8c31 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -228,6 +228,13 @@ STATUS(){ for NTYPE in "${ntypesel[@]}"; do PH=${NTYPE}_HOSTS[0] + if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ] || [ -f ${NM_TMPFOLDER}/${!PH}.skip ]; then + if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then + skip=1 + else + PH=${NODETYPE}_HOSTS[1] + fi + fi PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}" var=${NTYPE}_REPL_CHECK[@] if [ ! -z ${!var+x} ]; then @@ -257,7 +264,7 @@ STATUS(){ checked=good elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.timeout ]; then checked=timeout - elif [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.skip ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${nip}.skip ]; then + elif [ ${skip} -eq 1 ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${rcheck}.${nip}.skip ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${nip}.skip ] || [ -f ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip ]; then checked=skip fi if [ $(($(date +%s)-scanstart)) -gt 600 ]; then @@ -916,7 +923,7 @@ REPLSTART(){ PH=${NODETYPE}_HOSTS[0] PHA=${NODETYPE}_HOSTS skip=0 - echo "HERE1: ${skip} - ${!PH}" + # echo "HERE1: ${skip} - ${!PH}" if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then touch ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then @@ -929,10 +936,10 @@ REPLSTART(){ fi fi fi - echo "HERE2: ${skip} - ${!PH}" + # echo "HERE2: ${skip} - ${!PH}" if [ ${skip} -eq 0 ] && [ "${!PH}" != "" ]; then - echo "not skipped" + # echo "not skipped" PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}" var=${NODETYPE}_REPL_CHECK[@] if [ ! -z ${!var+x} ]; then @@ -943,8 +950,8 @@ REPLSTART(){ ${PH_CMD} 'find '${NM_REPL_CHECK_LOC[${rcheck}]}' -iname "*.sync-conflict-*" -exec rm {} \;' & done fi - else - echo "skipped" + # else + # echo "skipped" fi echo }