Stop a paused rsync counting as an absent partner and auto-offboarding the partnership

This commit is contained in:
Gmer4Lfe
2026-08-16 13:13:25 -04:00
parent 1d4dc44668
commit 19ba1e723c
@@ -244,9 +244,19 @@ if [[ "${PARTNERSHIP_ENABLED:-false}" == true ]]; then
PARTNER_DRY=""
[[ "$DRY_RUN" == true ]] && PARTNER_DRY="--dry-run"
# A successful rsync proves the partner answered; a failed one is evidence it did not. But
# rsync being switched off is neither — and it used to be read as "unseen", so the offline
# counter climbed every 30 minutes toward the 30-day auto-offboard on a partnership whose
# only fault was that RSYNC_ENABLED=false. That is how a deliberately paused sync ends up
# dismantling the partnership it was paused for. With no rsync attempt there is nothing to
# report, so the check runs without touching the counter either way.
if [[ "$RSYNC_OK" == true ]]; then
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
--check --remote-seen $PARTNER_DRY
elif [[ "${RSYNC_ENABLED:-false}" != true ]]; then
echo "Rsync disabled — partnership check runs, offline counter untouched"
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
--check $PARTNER_DRY
else
bash "$SCRIPT_DIR/../Partnership/partnership_manager.sh" \
--check --remote-unseen $PARTNER_DRY