瀏覽代碼

[snapcast] Add snapspot service config

Colin Powell 2 月之前
父節點
當前提交
40ca170a31

+ 11 - 0
lab/ansible/roles/snapcast/files/snapspot.kodi.service

@@ -0,0 +1,11 @@
+[Unit]
+Description=Snapspot
+After=network.target
+
+[Service]
+ExecStart=/storage/.kodi/addons/service.snapclient/bin/snapclient -h snapcast.service -i 2 -p 2704
+ExecStop=kill $(pidof snapclient)
+Restart=on-failure
+
+[Install]
+WantedBy=default.target

+ 19 - 0
lab/ansible/roles/snapcast/templates/snapspot.conf.j2

@@ -0,0 +1,19 @@
+[stream]
+bind_to_address = 0.0.0.0
+port = 2704
+source = librespot:///usr/local/bin/librespot?name=kitchen&devicename=Kitchen-Dining
+source = librespot:///usr/local/bin/librespot?name=living&devicename=LivingRoom
+source = librespot:///usr/local/bin/librespot?name=bath&devicename=Bathroom
+source = librespot:///usr/local/bin/librespot?name=craft&devicename=Craftroom
+source = librespot:///usr/local/bin/librespot?name=bed&devicename=Bedroom
+source = librespot:///usr/local/bin/librespot?name=basement&devicename=Basement
+source = librespot:///usr/local/bin/librespot?name=backyard&devicename=Backyard
+source = librespot:///usr/local/bin/librespot?name=frontyard&devicename=Frontyard
+codec = flac
+send_to_muted = false
+
+[http]
+enabled = true
+bind_to_address = 0.0.0.0
+port = 2780
+doc_root = /usr/local/share/snapserver/snapweb/