diff --git a/README.md b/README.md index bc7cde2..92ac84d 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **10.02.24:** - Add torrenting port support. +* **14.02.24:** - Only set/override torrenting port if the optional env var is set. +* **14.02.24:** - Add torrenting port support. * **31.01.24:** - Remove obsolete compat packages. * **25.12.23:** - Only pull stable releases of qbittorrent-cli. * **07.10.23:** - Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar). diff --git a/readme-vars.yml b/readme-vars.yml index 8cc304b..2ef2881 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -58,7 +58,8 @@ app_setup_block: | # changelog changelogs: - - { date: "10.02.24:", desc: "Add torrenting port support." } + - { date: "14.02.24:", desc: "Only set/override torrenting port if the optional env var is set." } + - { date: "14.02.24:", desc: "Add torrenting port support." } - { date: "31.01.24:", desc: "Remove obsolete compat packages."} - { date: "25.12.23:", desc: "Only pull stable releases of qbittorrent-cli."} - { date: "07.10.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."} diff --git a/root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run b/root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run index e5df339..b3158b1 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run @@ -2,8 +2,10 @@ # shellcheck shell=bash WEBUI_PORT=${WEBUI_PORT:-8080} -TORRENTING_PORT=${TORRENTING_PORT:-6881} +if [[ -n "${TORRENTING_PORT}" ]]; then + TORRENTING_PORT_ARG="--torrenting-port=${TORRENTING_PORT}" +fi exec \ s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${WEBUI_PORT}" \ - s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" --torrenting-port="${TORRENTING_PORT}" + s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" ${TORRENTING_PORT_ARG}