Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **01.08.26:** - Derive the RPC readiness check and shutdown request from `rpc-bind-address`/`rpc-url` instead of hardcoding localhost, and raise the service finish timeout.
* **31.05.26:** - Bind RPC to IPv6 interface by default, fall back to IPv4 if unavailable.
* **29.11.24:** - Fix PEERPORT setting.
* **07.10.23:** - Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar).
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ init_diagram: |
"transmission:latest" <- Base Images
# changelog
changelogs:
- {date: "01.08.26:", desc: "Derive the RPC readiness check and shutdown request from `rpc-bind-address`/`rpc-url` instead of hardcoding localhost, and raise the service finish timeout."}
- {date: "31.05.26:", desc: "Bind RPC to IPv6 interface by default, fall back to IPv4 if unavailable."}
- {date: "29.11.24:", desc: "Fix PEERPORT setting."}
- {date: "07.10.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."}
Expand Down
11 changes: 9 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/svc-transmission/finish
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@

pid=$(pidof transmission-daemon)
PORT=$(jq '.["rpc-port"]' /config/settings.json)
HOST=$(jq -r '.["rpc-bind-address"] // empty' /config/settings.json | tr -d '[]')
URL=$(jq -r '.["rpc-url"] // "/transmission/"' /config/settings.json)

case "${HOST}" in
"" | 0.0.0.0 | ::) HOST="127.0.0.1" ;;
*:*) HOST="[${HOST}]" ;;
esac

if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} -n "$USER":"$PASS" --exit
/usr/bin/transmission-remote "http://${HOST}:${PORT:-9091}${URL%/}" -n "$USER":"$PASS" --exit
else
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --exit
/usr/bin/transmission-remote "http://${HOST}:${PORT:-9091}${URL%/}" --exit
fi

tail --pid=${pid} -f /dev/null
9 changes: 7 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/svc-transmission/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
# shellcheck shell=bash

PORT=$(jq '.["rpc-port"]' /config/settings.json)
HOST=$(jq -r '.["rpc-bind-address"] // empty' /config/settings.json | tr -d '[]')

case "${HOST}" in
"" | 0.0.0.0 | ::) HOST="localhost" ;;
esac

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT:-9091}" \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z ${HOST} ${PORT:-9091}" \
s6-setuidgid abc /usr/bin/transmission-daemon \
-g /config -f
else
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT:-9091}" \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z ${HOST} ${PORT:-9091}" \
/usr/bin/transmission-daemon \
-g /config -f
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
30000
Loading