Skip to content
Merged
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
5 changes: 3 additions & 2 deletions root/app/blocklist-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 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 @@ -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