Skip to content

Commit

Permalink
Merge pull request #334 from linuxserver/libtorrentv1-dynamic-bind-ad…
Browse files Browse the repository at this point in the history
…dress
  • Loading branch information
thespad authored Oct 8, 2024
2 parents a6894b3 + 1d653ed commit a8d1065
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add -U --update --no-cache \
grep \
icu-libs \
p7zip \
python3 \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add -U --update --no-cache \
grep \
icu-libs \
p7zip \
python3 \
Expand Down
7 changes: 6 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if [[ -n "${TORRENTING_PORT}" ]]; then
TORRENTING_PORT_ARG="--torrenting-port=${TORRENTING_PORT}"
fi

WEBUI_ADDRESS=$(grep -Po "^WebUI\\\Address=\K(.*)" /config/qBittorrent/qBittorrent.conf)
if [[ -z ${WEBUI_ADDRESS} ]] || [[ ${WEBUI_ADDRESS} == "*" ]]; then
WEBUI_ADDRESS="localhost"
fi

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${WEBUI_PORT}" \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z ${WEBUI_ADDRESS} ${WEBUI_PORT}" \
s6-setuidgid abc /app/qbittorrent-nox --webui-port="${WEBUI_PORT}" ${TORRENTING_PORT_ARG}

0 comments on commit a8d1065

Please sign in to comment.