Skip to content

Commit

Permalink
[Feature] Autostart by default for uprcl and subsonic #245
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 committed Aug 19, 2023
1 parent 572c0c3 commit 01755a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ Just be careful to use the tag you have built.

Change Date|Major Changes
---|---
2023-08-19|Autostart by default for subsonic and uprcl (see issue [#245](https://github.com/GioF71/upmpdcli-docker/issues/245))
2023-08-19|Fixed documentation for `UPRCL_USER` (see issue [#241](https://github.com/GioF71/upmpdcli-docker/issues/241))
2023-08-19|Add autostart for radios (see issue [#239](https://github.com/GioF71/upmpdcli-docker/issues/239))
2023-08-19|Removed references to tidal plugin (see issue [#237](https://github.com/GioF71/upmpdcli-docker/issues/237))
Expand Down
6 changes: 4 additions & 2 deletions app/bin/run-upmpdcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,9 @@ if [ "${SUBSONIC_ENABLE^^}" == "YES" ]; then
SUBSONIC_ENABLE=YES
sed -i 's/\#subsonicuser/subsonicuser/g' $CONFIG_FILE
echo "SUBSONIC_AUTOSTART=[$SUBSONIC_AUTOSTART]"
if [ "${SUBSONIC_AUTOSTART^^}" == "YES" ]; then
if [[ -z "${SUBSONIC_AUTOSTART^^}" || "${SUBSONIC_AUTOSTART^^}" == "1" || "${SUBSONIC_AUTOSTART^^}" == "YES" ]]; then
sed -i 's/\#subsonicautostart/subsonicautostart/g' $CONFIG_FILE;
set_parameter $CONFIG_FILE SUBSONIC_AUTOSTART "$SUBSONIC_AUTOSTART" subsonicautostart
fi
echo "Setting subsonic base_url [$SUBSONIC_BASE_URL]"
sed -i 's/\#subsonicbaseurl/subsonicbaseurl/g' $CONFIG_FILE
Expand Down Expand Up @@ -375,7 +376,8 @@ if [ "${UPRCL_ENABLE^^}" == "YES" ]; then
sed -i 's/UPRCL_HOSTPORT/'"$UPRCL_HOSTPORT"'/g' $CONFIG_FILE;
fi
echo "UPRCL_AUTOSTART [$UPRCL_AUTOSTART]"
if [ -n "${UPRCL_AUTOSTART}" ]; then
if [[ -z "${UPRCL_AUTOSTART}" || "${UPRCL_AUTOSTART}" == 1 || "${UPRCL_AUTOSTART}" == "YES" ]]; then
UPRCL_AUTOSTART=1
echo "Setting uprclautostart $UPRCL_AUTOSTART"
sed -i 's/#uprclautostart/'"uprclautostart"'/g' $CONFIG_FILE;
sed -i 's/UPRCL_AUTOSTART/'"$UPRCL_AUTOSTART"'/g' $CONFIG_FILE;
Expand Down
2 changes: 1 addition & 1 deletion app/conf/upmpdcli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ upradiostitle = Upmpdcli Radio List
#scripts_dir = /usr/share/upmpdcli/src_scripts
#scscriptgracesecs = 2
#radio-browseruser = radio-browseruser
#subsonicautostart = 1
#subsonicautostart = SUBSONIC_AUTOSTART
#subsonicuser = SUBSONIC_USER
#subsonicpassword = SUBSONIC_PASSWORD
#subsonicbaseurl = SUBSONIC_BASE_URL
Expand Down

0 comments on commit 01755a5

Please sign in to comment.