ff648fa9b2
- Dockerfile: Ubuntu 20.04 + all SNEK dependencies (libgtk2-perl, libffi6, etc.) - entrypoint.sh: flash firmware via foxctl, start main_sigfox - deploy/snek.yaml: K8s manifest (namespace, PVC, deployment, LoadBalancer) - README: full documentation covering hardware, software, decoding, callbacks
21 lines
548 B
Bash
21 lines
548 B
Bash
#!/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
|