#!/bin/bash set -e echo "==> Sigfox Network Emulator container starting" echo "==> Detecting Sigfox dongle..." if lsusb | grep -iE "2cc1"; then echo "==> Dongle detected" else echo "!!! WARNING: no Sigfox dongle detected on /dev/bus/usb" echo "!!! Make sure the container has: privileged: true AND /dev/bus/usb mounted" fi echo "==> Flashing firmware (foxctl)..." cd /opt/snek ./foxctl || echo "foxctl RC=$? (may be normal if firmware already loaded)" sleep 2 echo "==> Starting SNEK main_sigfox on port 8085..." exec ./main_sigfox