diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-14 15:31:25 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-14 15:31:25 -0500 |
commit | 82995764a79e115e495e71b1ea6a961ae7cceaba (patch) | |
tree | b1dc602f4cc938a9f98ad4eb80d563d3309c62a2 /qbit-pia |
Batman
Diffstat (limited to 'qbit-pia')
-rw-r--r-- | qbit-pia/Dockerfile | 4 | ||||
-rwxr-xr-x | qbit-pia/run | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/qbit-pia/Dockerfile b/qbit-pia/Dockerfile new file mode 100644 index 0000000..bbc309b --- /dev/null +++ b/qbit-pia/Dockerfile @@ -0,0 +1,4 @@ +FROM linuxserver/qbittorrent:latest AS qbit-pia + +COPY run /etc/s6-overlay/s6-rc.d/svc-qbittorrent/run +RUN chmod 755 /etc/s6-overlay/s6-rc.d/svc-qbittorrent/run diff --git a/qbit-pia/run b/qbit-pia/run new file mode 100755 index 0000000..7a6e5e9 --- /dev/null +++ b/qbit-pia/run @@ -0,0 +1,12 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +WEBUI_PORT=${WEBUI_PORT:-8080} +TORRENTING_PORT=$(jq -r '.port' /etc/piaportforward.json) +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_ARG} |