#!/usr/bin/env bash # run-relay.sh — (re)start the matrix-relay container on the Uno Q host. # Runs the TCP:9999 → RouterBridge relay in a minimal container (the RouterBridge # python binding only ships in the App Lab image). Mounts the router socket, # publishes :9999 to loopback for the host ZeroClaw daemon's matrix tools. set -eu IMAGE="ghcr.io/arduino/app-bricks/python-apps-base:0.11.0" RELAY="${RELAY:-/home/arduino/matrix-relay/relay.py}" docker rm -f matrix-relay >/dev/null 2>&1 || true docker run -d --name matrix-relay --restart unless-stopped \ -v /run/arduino-router.sock:/var/run/arduino-router.sock \ -v "$RELAY":/relay.py:ro \ -p 127.0.0.1:9999:9999 \ --entrypoint python3 \ "$IMAGE" /relay.py echo "matrix-relay started (:9999 → RouterBridge)"