blob: 7a6e5e9259a7af6ecbb0458a983a73afe7986d24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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}
|