Files
DECNET/scripts/bus/start.sh
anti f0349632c3 chore(bus): add scripts/bus/ smoke + manual test helpers
start.sh boots a local bus on /tmp (no root, no decnet group).
sub.py / pub.py are thin CLIs over UnixSocketBus for manual poking.
smoke.sh is a self-contained end-to-end check — spawns a worker,
subscribes, publishes, asserts delivery, cleans up.
2026-04-21 14:03:30 -04:00

12 lines
439 B
Bash
Executable File

#!/usr/bin/env bash
# Start a local `decnet bus` worker for manual smoke-testing.
# Uses /tmp so it works without root and without the `decnet` POSIX group.
# Usage: scripts/bus/start.sh [heartbeat-seconds]
set -euo pipefail
SOCK="${DECNET_BUS_SOCKET:-/tmp/decnet-bus.sock}"
HEARTBEAT="${1:-3}"
echo "bus: socket=${SOCK} heartbeat=${HEARTBEAT}s (Ctrl-C to stop)"
exec decnet bus --socket "${SOCK}" --group "" --heartbeat "${HEARTBEAT}"