diff --git a/docker/icecast-entrypoint.sh b/docker/icecast-entrypoint.sh index 7099c2a..b001030 100644 --- a/docker/icecast-entrypoint.sh +++ b/docker/icecast-entrypoint.sh @@ -14,7 +14,11 @@ sed -i "s|localhost|$ICECAST_HOSTNAME| if [ "$ICECAST_ENABLE_YP" = "true" ]; then echo "YP directory publishing ENABLED" # Insert YP config before closing tag - sed -i 's||'"$(cat /etc/icecast-yp-snippet.xml)"'\n|' /etc/icecast.xml + # Use sed with a temp file to handle multi-line insertion + head -n -1 /etc/icecast.xml > /tmp/icecast-temp.xml + cat /etc/icecast-yp-snippet.xml >> /tmp/icecast-temp.xml + echo "" >> /tmp/icecast-temp.xml + mv /tmp/icecast-temp.xml /etc/icecast.xml else echo "YP directory publishing DISABLED (dev mode)" fi