#!/usr/bin/env bash # service-controller — host-side on/off API. Runs as a systemd USER unit. set -a; [ -f /home/sam/.config/environment.d/10-secrets.conf ] && . /home/sam/.config/environment.d/10-secrets.conf; set +a export SC_TOKEN="${SC_TOKEN:-}" export SC_SERVICES="${SC_SERVICES:-/home/sam/service-controller/services.toml}" export SC_AUDIT="${SC_AUDIT:-/home/sam/service-controller/audit.log}" # Bind to the docker bridge gateway so the portal container can reach us via # host.docker.internal. NOT reachable from the LAN; token still required. export SC_HOST="${SC_HOST:-192.168.144.1}" exec "${VENV:-/home/sam/service-controller/.venv}/bin/python" \ /home/sam/service-controller/service_controller.py