mirror of
https://github.com/linuxserver/docker-transmission.git
synced 2025-10-28 07:36:04 +01:00
account for changed port
This commit is contained in:
@@ -2,11 +2,12 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json)
|
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json)
|
||||||
|
PORT=$(jq '.["rpc-port"]' /config/settings.json)
|
||||||
|
|
||||||
if [[ "$BLOCKLIST_ENABLED" == true ]]; then
|
if [[ "$BLOCKLIST_ENABLED" == true ]]; then
|
||||||
if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; 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
|
else
|
||||||
/usr/bin/transmission-remote --blocklist-update
|
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --blocklist-update
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
pid=$(pidof transmission-daemon)
|
pid=$(pidof transmission-daemon)
|
||||||
|
PORT=$(jq '.["rpc-port"]' /config/settings.json)
|
||||||
|
|
||||||
if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then
|
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
|
else
|
||||||
/usr/bin/transmission-remote --exit
|
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tail --pid=${pid} -f /dev/null
|
tail --pid=${pid} -f /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user