diff --git a/README.md b/README.md index bb7708b..2cc5bd4 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ Just be careful to use the tag you have built. Date|Major Changes :---|:--- +2024-01-16|Fixed run script, see [#12](https://github.com/GioF71/minidlna-docker/issues/12) 2023-12-20|Allow docker user mode, see [#10](https://github.com/GioF71/minidlna-docker/issues/10) 2023-09-13|Switch to debian stable, see [#8](https://github.com/GioF71/minidlna-docker/issues/8) 2023-09-13|Add support to notify interval, see [#6](https://github.com/GioF71/minidlna-docker/issues/6) diff --git a/app/bin/run-minidlna.sh b/app/bin/run-minidlna.sh index 9101633..e82c6c2 100755 --- a/app/bin/run-minidlna.sh +++ b/app/bin/run-minidlna.sh @@ -94,7 +94,7 @@ fi USE_USER_MODE=N if [[ $current_user_id -eq 0 ]]; then - if [ -n "${PUID}" ] || [ [ "${USER_MODE^^}" = "Y" ] || [ "${USER_MODE^^}" = "YES" ] ]; then + if [[ -n "${PUID}" ]] || ([[ "${USER_MODE^^}" == "Y" ]] || [[ "${USER_MODE^^}" = "YES" ]]); then USE_USER_MODE=Y if [ -z "${PUID}" ]; then PUID=$DEFAULT_UID; @@ -132,10 +132,14 @@ if [[ $current_user_id -eq 0 ]]; then echo "user $USER_NAME already exists." fi fi + echo "Setting user permissions on /log ..." + chown -R $USER_NAME:$GROUP_NAME /log + echo "Setting user permissions on /db ..." + chown -R $USER_NAME:$GROUP_NAME /db + echo "User permissions set." fi if [ -n ${MINIDLNA_FORCE_SORT_CRITERIA} ]; then - #echo "force_sort_criteria=+upnp:class,+dc:date,+upnp:album,+upnp:originalTrackNumber,+dc:title" >> $CONFIG_FILE echo "force_sort_criteria=$MINIDLNA_FORCE_SORT_CRITERIA" >> $CONFIG_FILE fi