Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add an environment variable which allows using custom mpd.c… #365

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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