mirror of
https://github.com/LFManifesto/ReticulumHF
synced 2026-08-14 19:31:48 -04:00
- Add image/build.sh: Automated Pi image builder for ReticulumHF v1.0 - Add configs/: System configuration files (hostapd, dnsmasq, ALSA, radios DB) - Add scripts/wait-for-port: Service dependency utility - Update .gitignore: Exclude .claude/ and test files This release includes the complete build infrastructure for creating ReticulumHF Raspberry Pi images with pre-configured WiFi AP, web portal, and Reticulum gateway services.
16 lines
406 B
Bash
16 lines
406 B
Bash
#!/bin/bash
|
|
# Wait for a TCP port to be listening
|
|
# Usage: wait-for-port [port] [timeout_seconds]
|
|
|
|
PORT=${1:-8001}
|
|
TIMEOUT=${2:-30}
|
|
|
|
for i in $(seq 1 $TIMEOUT); do
|
|
if python3 -c "import socket; s=socket.socket(); s.settimeout(1); exit(0 if s.connect_ex(('127.0.0.1', $PORT))==0 else 1)" 2>/dev/null; then
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
echo "Port $PORT not ready after ${TIMEOUT}s" >&2
|
|
exit 1
|