Browse Source

Merge pull request #5879 from neheb/transmission

transmission: Add rpc_host_whitelist support.
lilik-openwrt-22.03
Hannu Nyman 7 years ago
committed by GitHub
parent
commit
5bb0a8b2cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions
  1. +1
    -1
      net/transmission/Makefile
  2. +3
    -1
      net/transmission/files/transmission.config
  3. +5
    -3
      net/transmission/files/transmission.init

+ 1
- 1
net/transmission/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
PKG_VERSION:=2.93
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master


+ 3
- 1
net/transmission/files/transmission.config View File

@ -3,6 +3,7 @@ config transmission
option config_dir '/tmp/transmission'
option config_overwrite '1'
option user 'transmission'
option group 'transmission'
option mem_percentage 50
option nice 10
option alt_speed_down 50
@ -49,13 +50,14 @@ config transmission
option rpc_authentication_required false
option rpc_bind_address '0.0.0.0'
option rpc_enabled true
option rpc_host_whitelist '127.0.0.1,192.168.1.*'
option rpc_host_whitelist_enabled false
option rpc_password ''
option rpc_port 9091
option rpc_url '/transmission/'
option rpc_username ''
option rpc_whitelist '127.0.0.1,192.168.1.*'
option rpc_whitelist_enabled true
option rpc_whitelist_enabled false
option scrape_paused_torrents_enabled true
option script_torrent_done_enabled false
option script_torrent_done_filename ''


+ 5
- 3
net/transmission/files/transmission.init View File

@ -46,6 +46,7 @@ transmission() {
local USE
local user
local group
local config_overwrite
local download_dir config_dir
local mem_percentage
@ -56,6 +57,7 @@ transmission() {
config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission'
config_get user "$cfg" 'user'
config_get group "$cfg" 'group'
config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission'
config_get mem_percentage "$cfg" 'mem_percentage' '50'
config_get config_overwrite "$cfg" config_overwrite 1
@ -71,7 +73,7 @@ transmission() {
mkdir -p $config_dir
chmod 0755 $config_dir
touch $config_file
[ -z "$user" ] || chown -R "$user:$user" $config_dir
[ -z "$user" ] || chown -R "$user:$group" $config_dir
}
[ "$config_overwrite" == 0 ] || {
@ -99,7 +101,7 @@ transmission() {
append_params_quotes "$cfg" \
blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \
peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \
rpc_username rpc_whitelist script_torrent_done_filename watch_dir
rpc_username rpc_host_whitelist rpc_whitelist script_torrent_done_filename watch_dir
echo "\"invalid-key\": false" >> $config_file
echo "}" >> $config_file
@ -111,7 +113,7 @@ transmission() {
procd_set_param command $cmdline
procd_set_param env CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
procd_set_param user $user
procd_set_param group $user
procd_set_param group $group
procd_set_param nice $nice
procd_set_param respawn retry=60


Loading…
Cancel
Save