From 52fc6098ff1232061aed2df04bfdbb743ff83742 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 24 Apr 2025 19:30:13 +0300 Subject: [PATCH] account for changed port --- root/app/blocklist-update.sh | 5 +++-- root/etc/s6-overlay/s6-rc.d/svc-transmission/finish | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/root/app/blocklist-update.sh b/root/app/blocklist-update.sh index 98405c5..6c86201 100755 --- a/root/app/blocklist-update.sh +++ b/root/app/blocklist-update.sh @@ -2,11 +2,12 @@ # shellcheck shell=bash BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json) +PORT=$(jq '.["rpc-port"]' /config/settings.json) if [[ "$BLOCKLIST_ENABLED" == true ]]; then if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then - /usr/bin/transmission-remote -n "$USER":"$PASS" --blocklist-update + /usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} -n "$USER":"$PASS" --blocklist-update else - /usr/bin/transmission-remote --blocklist-update + /usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --blocklist-update fi fi diff --git a/root/etc/s6-overlay/s6-rc.d/svc-transmission/finish b/root/etc/s6-overlay/s6-rc.d/svc-transmission/finish index d2cc9a1..3e42d8a 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-transmission/finish +++ b/root/etc/s6-overlay/s6-rc.d/svc-transmission/finish @@ -2,11 +2,12 @@ # shellcheck shell=bash pid=$(pidof transmission-daemon) +PORT=$(jq '.["rpc-port"]' /config/settings.json) if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then - /usr/bin/transmission-remote -n "$USER":"$PASS" --exit + /usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} -n "$USER":"$PASS" --exit else - /usr/bin/transmission-remote --exit + /usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --exit fi tail --pid=${pid} -f /dev/null