]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
More fixes
authorCharles <charlesthomasomer@gmail.com>
Mon, 22 Sep 2025 23:24:35 +0000 (00:24 +0100)
committerCharles <charlesthomasomer@gmail.com>
Mon, 22 Sep 2025 23:24:35 +0000 (00:24 +0100)
docker/classic/run.sh
docker/run.sh

index 81a15ef2c0d8f95f6e295eceac974d72df56f3c7..7012d37859d3f20c3837820e8ac29334bf16f185 100755 (executable)
@@ -5,15 +5,15 @@ set -e
 
 echo "Shairport Sync Startup ($(date))"
 
-if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ]; then
+if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 1 ]; then
   rm -rf /run/dbus/dbus.pid
   rm -rf /run/avahi-daemon/pid
 
   dbus-uuidgen --ensure
   dbus-daemon --system
-fi
 
-[ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ] || avahi-daemon --daemonize --no-chroot
+  avahi-daemon --daemonize --no-chroot
+fi
 
 while [ ! -f /var/run/avahi-daemon/pid ]; do
   echo "Warning: avahi is not running, sleeping for 5 seconds before trying to start shairport-sync"
index be53cb737a58332358975fba77ab3d461e126b84..bb1b1da7959d32cf39fd0cca595655fd0ba67bab 100755 (executable)
@@ -5,20 +5,20 @@ set -e
 
 echo "Shairport Sync Startup ($(date))"
 
-if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ]; then
+if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 1 ]; then
   rm -rf /run/dbus/dbus.pid
   rm -rf /run/avahi-daemon/pid
 
   dbus-uuidgen --ensure
   dbus-daemon --system
+
+  avahi-daemon --daemonize --no-chroot
 fi
 
 echo "Starting NQPTP ($(date))"
 
 (/usr/local/bin/nqptp > /dev/null 2>&1) &
 
-[ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ] || avahi-daemon --daemonize --no-chroot
-
 while [ ! -f /var/run/avahi-daemon/pid ]; do
   echo "Warning: avahi is not running, sleeping for 5 seconds before trying to start shairport-sync"
   sleep 5