#!/bin/sh
set -eu

OUT_DIR="${OUT_DIR:-/data}"
PDB_BASE="${PDB_BASE:-https://www.peeringdb.com}"
INFO_TYPE="${PDB_INFO_TYPE:-Educational/Research}"

if [ ! -d "${OUT_DIR}" ]; then
  echo "[health] OUT_DIR missing: ${OUT_DIR}" >&2
  exit 1
fi

if [ ! -s "${OUT_DIR}/GeoLite2-ASN.mmdb" ]; then
  echo "[health] GeoLite2-ASN.mmdb missing in ${OUT_DIR}" >&2
  exit 1
fi

if [ ! -s "${OUT_DIR}/nren_asns.txt" ]; then
  echo "[health] nren_asns.txt missing in ${OUT_DIR}" >&2
  exit 1
fi

exit 0
