Browse Source

transmission: Allow user to configure web ui home directory

Signed-off-by: Andrii Korzh <andrii.korzh@gmail.com>
lilik-openwrt-22.03
Andrii Korzh 6 years ago
parent
commit
582f697afd
3 changed files with 8 additions and 1 deletions
  1. +1
    -1
      net/transmission/Makefile
  2. +1
    -0
      net/transmission/files/transmission.config
  3. +6
    -0
      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.94
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master


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

@ -6,6 +6,7 @@ config transmission
option group 'transmission'
option mem_percentage 50
option nice 10
option web_home ''
option alt_speed_down 50
option alt_speed_enabled false
option alt_speed_time_begin 540


+ 6
- 0
net/transmission/files/transmission.init View File

@ -52,6 +52,7 @@ transmission() {
local mem_percentage
local nice
local cmdline
local web_home
section_enabled "$section" || return 1
@ -62,6 +63,7 @@ transmission() {
config_get mem_percentage "$cfg" 'mem_percentage' '50'
config_get config_overwrite "$cfg" config_overwrite 1
config_get nice "$cfg" nice 0
config_get web_home "$cfg" 'web_home'
local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
if test "$MEM" -gt 1;then
@ -123,6 +125,10 @@ transmission() {
logger -t transmission "Starting with $USE virt mem"
fi
if test -d "$web_home"; then
procd_set_param env TRANSMISSION_WEB_HOME="$web_home"
fi
procd_add_jail transmission log
procd_add_jail_mount $config_file
procd_add_jail_mount_rw $download_dir


Loading…
Cancel
Save