Related to: https://github.com/badaix/snapcast
Be able to switch host (snapserver) of snapclient by a simple rest call.
- Default port:
8090 - Default snapserver:
127.0.0.1:1704
- Download last .deb file: https://github.com/gilsdav/snapclient-switcher/releases
- Install:
sudo dpkg -i snapclient-switcher-x.x.deb
- Uninstall:
sudo dpkg -P snapclient-switcher
http://snapclientIp:8090/[?url=xxx.xxx.xxx.xxx][&port=xxxx]
- Reset to default:
http://snapclientIp:8090 - Change host:
http://snapclientIp:8090?url=newHostIp - Change port:
http://snapclientIp:8090?port=newPort - Change host and port:
http://snapclientIp:8090?url=newHostIp&port=newPort - Get current connection:
http://snapclientIp:8090/status
- Open
/etc/default/snapclient - And edit the line
START_SNAPCLIENT=false - Log as root
sudo -s - Unregister service
systemctl disable snapclient
- Execute
python snapclient-switcher.py [port]
- Copy
snapclient-switcher/usr/local/bin/snapclient-switcher.pyinto/usr/local/bin/folder - Start daemon
sudo ./snapclient-switcher/etc/init.d/snapclient-switcher start
- Copy
snapclient-switcher/etc/init.d/snapclient-switcherinto/etc/init.dfolder - Log as root
sudo -s - Register service
systemctl enable snapclient-switcher - Start service
service snapclient-switcher start