diff --git a/app/bin/run-upmpdcli.sh b/app/bin/run-upmpdcli.sh index 380764f..332ea38 100644 --- a/app/bin/run-upmpdcli.sh +++ b/app/bin/run-upmpdcli.sh @@ -594,9 +594,22 @@ if [ ! -w "$cache_directory" ]; then echo "Cache directory [${cache_directory}] is not writable" mkdir -p /tmp/cache cache_directory="/tmp/cache" +else + echo "Cache directory [${cache_directory}] is writable" fi sed -i 's\CACHE_DIRECTORY\'"$cache_directory"'\g' $CONFIG_FILE +log_directory=/log +if [ ! -w "$log_directory" ]; then + echo "Log directory [${log_directory}] is not writable" + mkdir -p /tmp/log + log_directory="/tmp/log" +else + echo "Log directory [${log_directory}] is writable" +fi +sed -i 's\LOG_DIRECTORY\'"$log_directory"'\g' $CONFIG_FILE + + cat $CONFIG_FILE if [[ $current_user_id == 0 ]]; then diff --git a/app/conf/upmpdcli.conf b/app/conf/upmpdcli.conf index 6323949..b5a01c2 100644 --- a/app/conf/upmpdcli.conf +++ b/app/conf/upmpdcli.conf @@ -1,7 +1,7 @@ cachedir = CACHE_DIRECTORY radiolist = /tmp/radiolist.conf upradiostitle = Upmpdcli Radio List -#logfilename = /log/upmpdcli.log +logfilename = LOG_DIRECTORY/upmpdcli.log #log level defaults to 2 #loglevel = LOG_LEVEL #pkgdatadir=/usr/share/upmpdcli diff --git a/doc/change-history.md b/doc/change-history.md index 1d0da6a..81fb5e1 100644 --- a/doc/change-history.md +++ b/doc/change-history.md @@ -2,6 +2,7 @@ Change Date|Major Changes ---|--- +2023-12-29|Verify log directory to be writable (see [#362](https://github.com/GioF71/upmpdcli-docker/issues/362)) 2023-12-29|Removed last references to deezer (see [#359](https://github.com/GioF71/upmpdcli-docker/issues/359)) 2023-12-29|Support running as user with `--user` (see [#358](https://github.com/GioF71/upmpdcli-docker/issues/358)) 2023-12-19|Default naming of oh renderer (see [#356](https://github.com/GioF71/upmpdcli-docker/issues/356))