2016-10-18 08:41:49 -04:00
|
|
|
#!/usr/bin/with-contenv bash
|
2023-03-02 19:16:31 -06:00
|
|
|
# shellcheck shell=bash
|
2016-10-18 08:41:49 -04:00
|
|
|
|
2020-04-28 09:20:16 -05:00
|
|
|
BLOCKLIST_ENABLED=$(jq -r '.["blocklist-enabled"]' /config/settings.json)
|
2025-04-24 19:30:13 +03:00
|
|
|
PORT=$(jq '.["rpc-port"]' /config/settings.json)
|
2016-10-18 08:41:49 -04:00
|
|
|
|
2022-11-02 15:42:31 +00:00
|
|
|
if [[ "$BLOCKLIST_ENABLED" == true ]]; then
|
|
|
|
|
if [[ -n "$USER" ]] && [[ -n "$PASS" ]]; then
|
2025-04-24 19:30:13 +03:00
|
|
|
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} -n "$USER":"$PASS" --blocklist-update
|
2022-11-02 15:42:31 +00:00
|
|
|
else
|
2025-04-24 19:30:13 +03:00
|
|
|
/usr/bin/transmission-remote 127.0.0.1:${PORT:-9091} --blocklist-update
|
2022-11-02 15:42:31 +00:00
|
|
|
fi
|
2016-11-02 09:38:19 -04:00
|
|
|
fi
|