From 799fed1dcc9d1c3be54e5214149b5d1532b1c0dc Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 25 Mar 2023 15:17:08 +0800 Subject: [PATCH] Add default value for WebUI port --- Readme.md | 1 + entrypoint.sh | 4 ++++ manual_build/Readme.md | 1 + manual_build/entrypoint.sh | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/Readme.md b/Readme.md index c30af6a..4576de3 100644 --- a/Readme.md +++ b/Readme.md @@ -54,6 +54,7 @@ https://github.com/qbittorrent/qBittorrent/issues If you are up to test the bleeding-edge version, you can put `alpha` to get the weekly build. * `QBT_WEBUI_PORT` \ This environment variable sets the port number which qBittorrent WebUI will be binded to. + Defaults to port `8080` if value is not set. #### Volumes diff --git a/entrypoint.sh b/entrypoint.sh index 36636c0..31551c2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -44,6 +44,10 @@ else sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile" fi +if [ -z "$QBT_WEBUI_PORT" ]; then + QBT_WEBUI_PORT=8080 +fi + # those are owned by root by default # don't change existing files owner in `$downloadsPath` chown qbtUser:qbtUser "$downloadsPath" diff --git a/manual_build/Readme.md b/manual_build/Readme.md index 411b489..b3425c5 100644 --- a/manual_build/Readme.md +++ b/manual_build/Readme.md @@ -44,6 +44,7 @@ It is also recommended to install Docker Compose as it can significantly ease th Or you can put `devel` to build the latest development version. * `QBT_WEBUI_PORT` \ This environment variable sets the port number which qBittorrent WebUI will be binded to. + Defaults to port `8080` if value is not set. #### Volumes diff --git a/manual_build/entrypoint.sh b/manual_build/entrypoint.sh index 36636c0..31551c2 100755 --- a/manual_build/entrypoint.sh +++ b/manual_build/entrypoint.sh @@ -44,6 +44,10 @@ else sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile" fi +if [ -z "$QBT_WEBUI_PORT" ]; then + QBT_WEBUI_PORT=8080 +fi + # those are owned by root by default # don't change existing files owner in `$downloadsPath` chown qbtUser:qbtUser "$downloadsPath"