Skip to content

Commit

Permalink
[Feature] Add an environment variable which allows using custom mpd.c…
Browse files Browse the repository at this point in the history
…onf file #356 (#365)
  • Loading branch information
GioF71 authored Dec 10, 2023
1 parent 88d1fb9 commit 8c81ea3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jamendo.txt|Jamendo Credentials
additional-alsa-presets.conf|Additional alsa presets
additional-outputs.txt|Additional outputs, which will be added to the configuration file during the container startup phase
asoundrc.txt|Alsa configuration file: this will be copied to `/home/mpd-user/.asoundrc` or to `/root/.asoundrc`, depending on user mode to be enabled or not
override.mpd.conf|User provided mpd configuration file (see [#356](https://github.com/GioF71/mpd-alsa-docker/issues/356)). Use at your own risk. If this file is available, it will be used in the final phase of the run script instead of the generated file.

For a reference for the structure of the credentials file, see the corresponding example file in the doc folder of the repository.

Expand Down
5 changes: 5 additions & 0 deletions app/bin/run-mpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,11 @@ elif [[ "${STDERR_ENABLED}" != "NO" && "${STDERR_ENABLED}" != "N" ]]; then
exit 9
fi

if [ -f "/user/config/override.mpd.conf" ]; then
echo "Overriding generated mpd configuration file, use this feature at your own risk!"
MPD_ALSA_CONFIG_FILE=/user/config/override.mpd.conf
fi

CMD_LINE="$CMD_LINE --no-daemon $MPD_ALSA_CONFIG_FILE"
echo "CMD_LINE=[$CMD_LINE]"
if [ $USE_USER_MODE == "Y" ]; then
Expand Down

0 comments on commit 8c81ea3

Please sign in to comment.