#!/usr/bin/env bash # Verify GUOSMM gazette notices are live and propagate config to banking stack. set -euo pipefail REPO_DIR="${OMNL_BANK_ROOT:-$HOME/smom-dbis-138}" REGISTRY="${REPO_DIR}/config/guosmm-notices.v1.json" log() { echo "[$(date -Iseconds)] guosmm-sync $*"; } [[ -f "$REGISTRY" ]] || { log "Missing $REGISTRY"; exit 1; } log "Verifying gazette URLs..." while IFS= read -r url; do [[ -n "$url" ]] || continue code="$(curl -sS -o /dev/null -w '%{http_code}' "$url")" log " $url -> HTTP $code" [[ "$code" == "200" ]] || exit 1 done < <(node -e " const r=require('${REGISTRY//\\/\\\\}'); for (const n of r.notices) console.log(n.url); ") log "API catalog probe (local token-aggregation)..." curl -sf "http://127.0.0.1:3000/api/v1/omnl/gazette/notices" | head -c 200 || log "WARN: local API not up — redeploy first" echo if [[ "${GUOSMM_SYNC_LXCS:-0}" == "1" ]]; then PROXMOX_ROOT="${PROXMOX_ROOT:-/srv/projects/proxmox}" if [[ -f "${PROXMOX_ROOT}/scripts/deployment/sync-zardasht-omnl-banking-portal-lxcs.sh" ]]; then log "LXC sync..." bash "${PROXMOX_ROOT}/scripts/deployment/sync-zardasht-omnl-banking-portal-lxcs.sh" --apply fi fi log "GUOSMM notices deployed to config + API registry" log " Portal: /central-bank and /hub (gazette section)" log " API: GET /api/v1/omnl/gazette/notices"