transmission: Allow user to configure web ui home directory 6459/head 6462/head
authorAndrii Korzh <andrii.korzh@gmail.com>
Thu, 12 Jul 2018 12:40:07 +0000 (15:40 +0300)
committerAndrii Korzh <andrii.korzh@gmail.com>
Thu, 12 Jul 2018 12:40:07 +0000 (15:40 +0300)
Signed-off-by: Andrii Korzh <andrii.korzh@gmail.com>
net/transmission/Makefile
net/transmission/files/transmission.config
net/transmission/files/transmission.init

index 7e05f75e912680f8f50de4b10672a1d730bb6df0..6dfd4b32e0b16f85f58614af2727ac27646f7ab0 100644 (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
index 0dad95042829462b7874ac94146f9b48f661eda7..770908c7f2d2119bbf93481dd0ea11d4afe5f78b 100644 (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
index c7593ac1d691168b8ffec659abb7633d08538f0e..521fe20b83ed0bc95933ab9a5f9d781872003aea 100644 (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