From 82995764a79e115e495e71b1ea6a961ae7cceaba Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Thu, 14 Nov 2024 15:31:25 -0500 Subject: Batman --- qbit-pia/run | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 qbit-pia/run (limited to 'qbit-pia/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} -- cgit v1.2.3