transmission: include default 'web_home' dir in jail
authorDaniel Golle <daniel@makrotopia.org>
Sat, 20 Nov 2021 15:57:58 +0000 (15:57 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 20 Nov 2021 16:29:28 +0000 (16:29 +0000)
Fixes 'transmission-web' for users which didn't manually configure the
'web_home' option.
Assume transmission's default in case 'web_home' isn't defined and
mount the directory so it can be accessed from inside the jail.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
net/transmission/Makefile
net/transmission/files/transmission.init

index 7434dd4ba319057e605ccdef03977b1a3b4b6d0d..16748e7c498cf6fa381e7af577578ac434ff27a6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=3.00
-PKG_RELEASE:=16
+PKG_RELEASE:=17
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
index 3c4c7d805d7846a454799c83ca1f1532c71de7c7..4d1599efba976ba95ef85d4c76d9558e6fec00eb 100644 (file)
@@ -160,7 +160,8 @@ transmission() {
        procd_add_jail_mount_rw "$config_dir/blocklists"
        procd_add_jail_mount_rw "$config_dir/stats.json"
        procd_add_jail_mount_rw "$download_dir"
-       [ -d "$web_home" ] && procd_add_jail_mount_rw "$web_home"
+       web_home="${web_home:-/usr/share/transmission/web}"
+       [ -d "$web_home" ] && procd_add_jail_mount "$web_home"
        procd_close_instance
 }