#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
mkdir -p logs
: "${GOTRACEBACK:=crash}"
BIN="./XXTLanControl-backend-linux-arm64"
LOG="logs/backend-$(date +%F).log"
echo "Version: v202608221455 (commit 8794b0a)"
echo "Starting $BIN, logging to $LOG"
"$BIN" 2>&1 | tee -a "$LOG"
