From 9f77ec0bc677d85c42927995b907178f1423c66e Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 1 Jan 2024 19:04:43 -0600 Subject: [PATCH] update --- defaults.inc | 2 ++ inc/status.inc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defaults.inc b/defaults.inc index df547268..f7649525 100755 --- a/defaults.inc +++ b/defaults.inc @@ -31,6 +31,8 @@ if [ -f ${NM_FOLDER}/conf/defaults.local.inc ]; then source ${NM_FOLDER}/conf/defaults.local.inc + [ "${NM_REPL_CHECK_TIMEOUT}" != "" ] && NM_REPL_CHECK_TIMEOUT=${NM_REPL_CHECK_TIMEOUT} || NM_REPL_CHECK_TIMEOUT=5 #MINUTES + IFS=, LOCAL_SERVICES=(${LOCAL_SERVICES}) unset IFS diff --git a/inc/status.inc b/inc/status.inc index 9b6ce82b..4d1c618e 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -33,7 +33,7 @@ STATUS(){ ## REPLICATION CHECK SETUP ############################ # REPLRUN=0 - [ "${NM_DISABLE_REPL_CHECK}" != "true" ] && ([ ! -f ${NM_TMPFOLDER}/.replcheck ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.replcheck)) -ge 300 ]) && REPLRUN=1 || REPLRUN=0 + [ "${NM_DISABLE_REPL_CHECK}" != "true" ] && ([ ! -f ${NM_TMPFOLDER}/.replcheck ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.replcheck)) -ge $(expr ${NM_REPL_CHECK_TIMEOUT} * 60) ]) && REPLRUN=1 || REPLRUN=0 [ ${REPLRUN} -eq 1 ] && touch ${NM_TMPFOLDER}/.replcheck # if [ "${STATUS_ACTION}" == "report" ] || [ "${STATUS_ACTION}" == "repl" ] || [ "${STATUS_ACTION}" == "check" ] || [ "${STATUS_ACTION}" == "" ]; then if [ "${STATUS_ACTION}" == "repl" ] || ([ "${STATUS_ACTION}" == "" ] && [ "${ntss}" == "" ]) || ([ "${STATUS_ACTION}" == "report" ] && [ ${REPLRUN} -eq 1 ]) || ([ "${ntss}" != "" ] && [ "${NM_REPL_CHECK[${ntss}]}" != "" ] && ([ "${STATUS_ACTION}" == "" ] || [ "${STATUS_ACTION}" == "repl" ])); then