#!/usr/bin/env bash set -Eeuo pipefail SRC=${1:?usage: check-rustproxy-source.sh /path/to/RustProxy} for f in Cargo.toml grafana/rustproxy-overview.json src/main/bootstrap.rs; do [[ -f "$SRC/$f" ]] || { echo "missing: $f" >&2; exit 1; } done grep -q '^name = "rust-proxy"' "$SRC/Cargo.toml" grep -q 'RUST_PROXY_CONFIG' "$SRC/src/main/bootstrap.rs" grep -q 'Reload,' "$SRC/src/main/bootstrap.rs" # Old RustProxy releases shipped full Debian metadata. The 0.34.x source # archive no longer does; the builder's own nFPM fallback is authoritative. if [[ -f "$SRC/debian/rustproxy.service" ]]; then grep -q 'ExecStart=' "$SRC/debian/rustproxy.service" else [[ -f "$SRC/deploy/rustproxy.service" ]] || { echo 'no reference systemd unit found' >&2; exit 1; } grep -q '^ExecReload=' "$SRC/deploy/rustproxy.service" fi echo 'RustProxy source supports --config and soft reload: OK'