Add one-command install script and stability fixes

- Add install.sh for automated setup
- Add all component files (wrapper, service, config, verify)
- Add stability fixes section (WiFi PowerSave disable + Watchdog)
- Update README with new installation instructions
This commit is contained in:
Geert Rademakers
2026-02-17 23:17:38 +01:00
parent 0c078771a0
commit 9529f1b0e1
8 changed files with 406 additions and 5 deletions

24
03-darkice-wrapper.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
MAX_WAIT_SEC=90
SLEEP_STEP=2
DARKICE_CMD="/usr/bin/darkice -c /home/pi/darkice.cfg"
log() { echo "[$(date '+%H:%M:%S')] $*" >&2; }
log "⏳ Waiting for ALSA card 0 (USB audio)..."
elapsed=0
while ! arecord -l 2>/dev/null | grep -q "^card 0:"; do
if (( elapsed >= MAX_WAIT_SEC )); then
log "💥 FATAL: No card 0 after ${MAX_WAIT_SEC}s"
arecord -l || true
exit 1
fi
sleep "${SLEEP_STEP}"
elapsed=$((elapsed + SLEEP_STEP))
done
log "✅ Card 0 ready! Launching DarkIce."
exec ${DARKICE_CMD}