From 8a6b41baccb045a6f630b5178974d4f6d6bbdbc4 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 12 Aug 2025 20:17:52 -0500 Subject: [PATCH] Revert "music-assistant: Tell players to restart on startup" This hacky work-around is no longer necessary, as I've figured out why the players don't (always) get rediscovered when the server restarts. It turns out, Avahi on the firewall was caching responses to the mDNS PTR requests Music Assistant makes. Rather than forward the requests to the other VLANs, it would respond with its cached information, but in a way that Music Assistant didn't understand. Setting `cache-entries-max` to `0` in `avahi-daemon.conf` on the firewall resolved the issue. This reverts commit 42a7964991a133ba7d9e5f2a8db9ce428ec1de6f. --- music-assistant/kustomization.yaml | 19 ------------------- music-assistant/restart-sync.service | 22 ---------------------- music-assistant/restart-sync.sh | 15 --------------- 3 files changed, 56 deletions(-) delete mode 100644 music-assistant/restart-sync.service delete mode 100644 music-assistant/restart-sync.sh diff --git a/music-assistant/kustomization.yaml b/music-assistant/kustomization.yaml index f579ba0..9ce2daf 100644 --- a/music-assistant/kustomization.yaml +++ b/music-assistant/kustomization.yaml @@ -16,25 +16,6 @@ resources: - music-assistant.yaml - ingress.yaml -patches: -- patch: | - apiVersion: apps/v1 - kind: StatefulSet - metadata: - name: music-assistant - spec: - template: - spec: - containers: - - name: music-assistant - lifecycle: - postStart: - exec: - command: - - wget - - -qO- - - http://ntfy.ntfy:2586/0e386416-ac43-488c-b709-efac8e2555a3/publish?message=restart - images: - name: ghcr.io/music-assistant/server newTag: 2.6.0b18 diff --git a/music-assistant/restart-sync.service b/music-assistant/restart-sync.service deleted file mode 100644 index 025e8c8..0000000 --- a/music-assistant/restart-sync.service +++ /dev/null @@ -1,22 +0,0 @@ -# vim: set ft=systemd : - -# In order for this to be effective, `shairport-sync.service` needs a -# configuration override to enable auto-restart, e.g.: -# -# [Service] -# Restart=always -# RestartSec=1 - -[Unit] -Description=Restart shairport-sync when music-assistant restarts -Wants=network-online.target -After=network-online.target - -[Service] -Type=simple -ExecStart=/usr/local/libexec/restart-sync.sh -Restart=always -RestartSec=1 - -[Install] -WantedBy=shairport-sync.service diff --git a/music-assistant/restart-sync.sh b/music-assistant/restart-sync.sh deleted file mode 100644 index a1d7e96..0000000 --- a/music-assistant/restart-sync.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -TOPIC=0e386416-ac43-488c-b709-efac8e2555a3 -NTFY=https://ntfy.pyrocufflink.net -DELAY=10 - -url=$(printf '%s/%s/raw' "${NTFY}" "${TOPIC}") - -curl -sN "${url}" \ - | stdbuf -o0 grep restart \ - | while read l; do -printf 'Restarting shairport-sync in %d seconds\n' "$DELAY" >&2 -sleep $DELAY -busctl call org.gnome.ShairportSync /org/gnome/ShairportSync org.gnome.ShairportSync Quit -done