account for changed port

This commit is contained in:
Stavros Kois
2025-04-24 19:30:13 +03:00
committed by GitHub
parent 2c2f302bb7
commit 52fc6098ff
2 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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