#!/usr/bin/env bash
# platform-sdp-host/status — same outputs as apply.
set -euo pipefail
cat >/dev/null
TORV=$(tor --version 2>/dev/null | sed -n '1s/^Tor version \([0-9][0-9.]*[0-9]\).*/\1/p' || true)
ACTIVE=false; if systemctl is-active --quiet tor 2>/dev/null; then ACTIVE=true; fi
jq -n --arg v "${TORV:-}" --argjson a "$ACTIVE" '{torVersion:$v,torActive:$a,deployHook:"/usr/local/sbin/sdp-deploy"}' > "$SSR_OUTPUTS"
