Add CONF_SYNC_ENABLED gate — skip partner sync when HOST2 is offline

This commit is contained in:
Gmer4Lfe
2026-06-06 16:37:05 -04:00
parent 273a2973e0
commit bd73e87bf9
+11
View File
@@ -49,6 +49,11 @@ done
parse_args "${FILTERED_ARGS[@]}"
detect_hosts
if [[ "${CONF_SYNC_ENABLED:-true}" == false ]]; then
log "CONF_SYNC_ENABLED=false — skipping"
exit 0
fi
CACHE_DIR="/tmp/.vv/config/cached/.confs"
MY_CONF="$SCRIPTS_ROOT/Configurations/${MY_ID,,}.conf"
SSH_TIMEOUT=10
@@ -145,3 +150,9 @@ elif [[ "$PULL_ONLY" == true ]]; then
else
info "Conf sync complete — pulled $PULLED, pushed $PUSHED${FAILED:+, $FAILED failed}"
fi
if [[ "$FAILED" -gt 0 ]]; then
notify "Conf sync on $LOCAL_SERVER_NAME ($MY_ID) — $FAILED partner(s) failed. Partner config cache may be stale." \
"Conf Sync" "warning"
exit 1
fi