Files
sonos-aux-recordplayer-pi/02-deploy.sh
Geert Rademakers 9529f1b0e1 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
2026-02-17 23:17:38 +01:00

31 lines
863 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
echo "🖥️ Deploying Record Player → Sonos AUX..."
cd /home/pi
# Copy files
cp 03-darkice-wrapper.sh .
cp 04-sonos-aux.service /etc/systemd/system/sonos-aux.service
cp darkice.cfg.example darkice.cfg # Edit your passwords!
chmod +x darkice-wrapper.sh
sudo chown root:audio darkice-wrapper.sh
sudo chmod 755 darkice-wrapper.sh
# Fix USB audio = card 0 always
echo "blacklist snd_bcm2835" | sudo tee -a /etc/modprobe.d/raspi-blacklist.conf
sudo sed -i 's/^options snd-usb-audio index=-2/#options snd-usb-audio index=-2/' /lib/modprobe.d/aliases.conf
# Icecast setup (one-time)
sudo systemctl enable icecast2
sudo systemctl start icecast2
# Systemd service
sudo systemctl daemon-reload
sudo systemctl enable sonos-aux.service
echo "✅ Reboot to finish: sudo reboot"
echo "Then check: journalctl -u sonos-aux.service -f"