From 7b3fbf1a1f52afff0b61025e6de849a00ef85234 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 2 Nov 2023 01:33:05 +0100 Subject: [PATCH] STRAPS[0] correct swarm missed updates --- RUNTIME/SECTOR.refresh.sh | 5 +++++ RUNTIME/UPLANET.refresh.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/RUNTIME/SECTOR.refresh.sh b/RUNTIME/SECTOR.refresh.sh index 35ce8ad6..160f537d 100755 --- a/RUNTIME/SECTOR.refresh.sh +++ b/RUNTIME/SECTOR.refresh.sh @@ -108,6 +108,11 @@ for SECTOR in ${SECTORS[@]}; do ## IN CASE OLD BOOSTRAP IS STILL IN CHARGE - CHOOSE 1ST STRAP - [[ ! $(echo ${STRAPS[@]} | grep ${ACTINGNODE}) ]] && ACTINGNODE=${STRAPS[0]} + ## IF NOT UPDATED FOR TOO LONG + [ ${DIFF_SECONDS} -gt 100800 ] \ + && echo "More than 28H update" \ + && ACTINGNODE=${STRAPS[0]} + [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]] \ && echo ">> ACTINGNODE=${ACTINGNODE} is not ME - CONTINUE -" \ && continue diff --git a/RUNTIME/UPLANET.refresh.sh b/RUNTIME/UPLANET.refresh.sh index 125e3fa6..b2260eac 100755 --- a/RUNTIME/UPLANET.refresh.sh +++ b/RUNTIME/UPLANET.refresh.sh @@ -111,6 +111,11 @@ mkdir ~/.zen/tmp/${MOATS} ## IN CASE OLD BOOSTRAP IS STILL IN CHARGE - CHOOSE 1ST STRAP - [[ ! $(echo ${STRAPS[@]} | grep ${ACTINGNODE}) ]] && ACTINGNODE=${STRAPS[0]} + ## IF NOT UPDATED FOR TOO LONG + [ ${DIFF_SECONDS} -gt 100800 ] \ + && echo "More than 28H update" \ + && ACTINGNODE=${STRAPS[0]} + echo "* ACTINGNODE=${ACTINGNODE}" [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]] \