Merge pull request #333 from linuxserver/master-dynamic-bind-address

This commit is contained in:
Adam 2024-10-08 11:09:04 +01:00 committed by GitHub
commit efa08e0e83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View file

@ -21,6 +21,7 @@ XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
grep \
icu-libs \
p7zip \
python3 \

View file

@ -21,6 +21,7 @@ XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
grep \
icu-libs \
p7zip \
python3 \

View file

@ -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 /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" ${TORRENTING_PORT_ARG}