Skip to content

Commit e51bf36

Browse files
committed
Update AirPlay receiver configuration to use a template for shairport-sync
1 parent f9255ed commit e51bf36

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

docker-compose.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ services:
5353
restart: unless-stopped
5454
network_mode: host
5555
volumes:
56-
- ./shairport-sync.conf:/etc/shairport-sync.conf:ro
56+
- ./shairport-sync.conf:/tmp/shairport-sync-template.conf:ro
5757
- airplay-shared:/tmp/airplay-shared # Shared volume for state files
5858
environment:
5959
- PULSE_SERVER=unix:/run/user/1000/pulse/native
6060
- AIRPLAY_NAME=${AIRPLAY_NAME:-HomeSpeaker}
61-
command: |
61+
entrypoint: |
6262
sh -c "
6363
# Debug: Show what name we're using
6464
echo \"Using AirPlay name: \$$AIRPLAY_NAME\"
@@ -78,15 +78,17 @@ services:
7878
7979
chmod +x /usr/local/bin/airplay-start.sh
8080
chmod +x /usr/local/bin/airplay-stop.sh
81-
# Update the config file with the correct name
81+
82+
# Copy template and replace placeholder with actual name
83+
cp /tmp/shairport-sync-template.conf /etc/shairport-sync.conf
8284
sed -i \"s/AIRPLAY_NAME_PLACEHOLDER/\$$AIRPLAY_NAME/g\" /etc/shairport-sync.conf
8385
8486
# Debug: Show the updated config
8587
echo \"Updated config:\"
8688
grep 'name =' /etc/shairport-sync.conf
8789
88-
# Start shairport-sync
89-
exec shairport-sync -c /etc/shairport-sync.conf
90+
# Start the original entrypoint
91+
exec /init
9092
"
9193
depends_on:
9294
- homespeaker.server2

0 commit comments

Comments
 (0)