Skip to content

Commit 2fbe193

Browse files
authored
Merge pull request #307 from stavros-k/patch-1
2 parents 2b0e424 + 52fc609 commit 2fbe193

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

root/app/blocklist-update.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# shellcheck shell=bash
33

44
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json)
5+
PORT=$(jq '.["rpc-port"]' /config/settings.json)
56

67
if [[ "$BLOCKLIST_ENABLED" == true ]]; then
78
if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then
8-
/usr/bin/transmission-remote -n "$USER":"$PASS" --blocklist-update
9+
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} -n "$USER":"$PASS" --blocklist-update
910
else
10-
/usr/bin/transmission-remote --blocklist-update
11+
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --blocklist-update
1112
fi
1213
fi

root/etc/s6-overlay/s6-rc.d/svc-transmission/finish

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# shellcheck shell=bash
33

44
pid=$(pidof transmission-daemon)
5+
PORT=$(jq '.["rpc-port"]' /config/settings.json)
56

67
if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then
7-
/usr/bin/transmission-remote -n "$USER":"$PASS" --exit
8+
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} -n "$USER":"$PASS" --exit
89
else
9-
/usr/bin/transmission-remote --exit
10+
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --exit
1011
fi
1112

1213
tail --pid=${pid} -f /dev/null

0 commit comments

Comments
 (0)