Skip to content

Commit d05f3d8

Browse files
committed
Refactor AirPlay entrypoint to improve readability and debug output
1 parent e51bf36 commit d05f3d8

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docker-compose.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ services:
5858
environment:
5959
- PULSE_SERVER=unix:/run/user/1000/pulse/native
6060
- AIRPLAY_NAME=${AIRPLAY_NAME:-HomeSpeaker}
61-
entrypoint: |
62-
sh -c "
61+
entrypoint:
62+
- sh
63+
- -c
64+
- |
6365
# Debug: Show what name we're using
64-
echo \"Using AirPlay name: \$$AIRPLAY_NAME\"
66+
echo "Using AirPlay name: $${AIRPLAY_NAME}"
6567
6668
# Create state management scripts inside container
6769
cat > /usr/local/bin/airplay-start.sh << 'EOF'
@@ -81,15 +83,14 @@ services:
8183
8284
# Copy template and replace placeholder with actual name
8385
cp /tmp/shairport-sync-template.conf /etc/shairport-sync.conf
84-
sed -i \"s/AIRPLAY_NAME_PLACEHOLDER/\$$AIRPLAY_NAME/g\" /etc/shairport-sync.conf
86+
sed -i "s/AIRPLAY_NAME_PLACEHOLDER/$${AIRPLAY_NAME}/g" /etc/shairport-sync.conf
8587
8688
# Debug: Show the updated config
87-
echo \"Updated config:\"
89+
echo "Updated config:"
8890
grep 'name =' /etc/shairport-sync.conf
8991
9092
# Start the original entrypoint
9193
exec /init
92-
"
9394
depends_on:
9495
- homespeaker.server2
9596

0 commit comments

Comments
 (0)