]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Fixes and info improvements
authorCharles <charlesthomasomer@gmail.com>
Mon, 22 Sep 2025 23:04:42 +0000 (00:04 +0100)
committerCharles <charlesthomasomer@gmail.com>
Mon, 22 Sep 2025 23:04:42 +0000 (00:04 +0100)
docker/classic/run.sh
docker/run.sh

index 2d562bdb27063509034a641ad8dfce283e6e27c8..81a15ef2c0d8f95f6e295eceac974d72df56f3c7 100755 (executable)
@@ -3,18 +3,21 @@
 # exist if any command returns a non-zero result
 set -e
 
+echo "Shairport Sync Startup ($(date))"
+
 if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ]; then
   rm -rf /run/dbus/dbus.pid
   rm -rf /run/avahi-daemon/pid
 
-dbus-uuidgen --ensure
-dbus-daemon --system
+  dbus-uuidgen --ensure
+  dbus-daemon --system
+fi
 
 [ -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 1 second before trying to start shairport-sync"
-  sleep 1
+  echo "Warning: avahi is not running, sleeping for 5 seconds before trying to start shairport-sync"
+  sleep 5
 done
 
 # for PipeWire
@@ -24,4 +27,6 @@ export XDG_RUNTIME_DIR=/tmp
 export PULSE_SERVER=unix:/tmp/pulseaudio.socket
 export PULSE_COOKIE=/tmp/pulseaudio.cookie
 
+echo "Finished startup tasks ($(date)), starting Shairport Sync."
+
 exec /usr/local/bin/shairport-sync "$@"
index 3b656e9bdbd038f490e08c5ba236538ffe8c60e1..be53cb737a58332358975fba77ab3d461e126b84 100755 (executable)
@@ -3,6 +3,8 @@
 # exist if any command returns a non-zero result
 set -e
 
+echo "Shairport Sync Startup ($(date))"
+
 if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ]; then
   rm -rf /run/dbus/dbus.pid
   rm -rf /run/avahi-daemon/pid
@@ -11,13 +13,15 @@ if [ -z ${ENABLE_AVAHI+x} ] || [ $ENABLE_AVAHI -eq 0 ]; then
   dbus-daemon --system
 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 1 second before trying to start shairport-sync"
-  sleep 1
+  echo "Warning: avahi is not running, sleeping for 5 seconds before trying to start shairport-sync"
+  sleep 5
 done
 
 # for PipeWire
@@ -27,4 +31,6 @@ export XDG_RUNTIME_DIR=/tmp
 export PULSE_SERVER=unix:/tmp/pulseaudio.socket
 export PULSE_COOKIE=/tmp/pulseaudio.cookie
 
+echo "Finished startup tasks ($(date)), starting Shairport Sync."
+
 exec /usr/local/bin/shairport-sync "$@"