Skip to content

Commit

Permalink
Merge branch 'main' into only_luci
Browse files Browse the repository at this point in the history
* main:
  luci-app-jellyfin: dont set cache path by default
  luci-app-clouddrive2: supports bind /mnt
  • Loading branch information
jjm2473 committed Jan 17, 2024
2 parents 6fd3cf6 + 69f2b0c commit eb083bb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion applications/luci-app-clouddrive2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

include $(TOPDIR)/rules.mk

PKG_VERSION:=1.0.0-1
PKG_VERSION:=1.0.1-20240117
PKG_RELEASE:=

LUCI_TITLE:=LuCI support for CloudDrive2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ local paths, default_path = clouddrive2_model.find_paths(blocks, home, "Caches")
for _, val in pairs(paths) do
o:value(val, val)
end
o.default = default_path

o = s:option(Flag, "share_mnt", translate("Share /mnt"), translate("CloudDrive can read and write other mount points under /mnt for its synchronization or backup functions"))
o.default = 0

return m
6 changes: 6 additions & 0 deletions applications/luci-app-clouddrive2/po/zh-cn/clouddrive2.po
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ msgstr "临时文件路径"
msgid "Default use 'temp' in 'config path' if not set, please make sure there has enough space"
msgstr "留空则使用配置文件路径下的 temp,请确保有足够空间"

msgid "Share /mnt"
msgstr "共享 /mnt"

msgid "CloudDrive can read and write other mount points under /mnt for its synchronization or backup functions"
msgstr "CloudDrive 能够读写 /mnt 下的其他挂载点,用于支持其同步或备份功能"

msgid "Service Status"
msgstr "服务状态"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ config clouddrive2
option 'image' 'default'
# option 'config_path' ''
# option 'cache_path' ''
option 'share_mnt' '0'
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ shift 1
IMAGE_NAME='default'

get_image() {
IMAGE_NAME=`uci get clouddrive2.@clouddrive2[0].image 2>/dev/null`
IMAGE_NAME=`uci -q get clouddrive2.@clouddrive2[0].image 2>/dev/null`
if [ -z "$IMAGE_NAME" -o "$IMAGE_NAME" == "default" ]; then
IMAGE_NAME="cloudnas/clouddrive2"
fi
Expand All @@ -24,9 +24,10 @@ do_install() {
}

do_install_detail() {
local config=`uci get clouddrive2.@clouddrive2[0].config_path 2>/dev/null`
local cache=`uci get clouddrive2.@clouddrive2[0].cache_path 2>/dev/null`
local port=`uci get clouddrive2.@clouddrive2[0].port 2>/dev/null`
local config=`uci -q get clouddrive2.@clouddrive2[0].config_path 2>/dev/null`
local cache=`uci -q get clouddrive2.@clouddrive2[0].cache_path 2>/dev/null`
local port=`uci -q get clouddrive2.@clouddrive2[0].port 2>/dev/null`
local share_mnt=`uci -q get clouddrive2.@clouddrive2[0].share_mnt 2>/dev/null`

if [ -z "$config" ]; then
echo "config path is empty!"
Expand All @@ -42,12 +43,16 @@ do_install_detail() {
--dns=172.17.0.1 \
-p $port:19798"

local tz="`uci get system.@system[0].zonename | sed 's/ /_/g'`"
local tz="`uci -q get system.@system[0].zonename | sed 's/ /_/g'`"
[ -z "$tz" ] || cmd="$cmd -e TZ=$tz"

# make sure shared mount point
# make sure shared mount point existed
/etc/init.d/clouddrive2 boot

if [ "$share_mnt" = 1 ]; then
cmd="$cmd -v /mnt:/mnt"
mountpoint -q /mnt && cmd="$cmd:rslave"
fi
cmd="$cmd -v /mnt/CloudNAS:/mnt/CloudNAS:shared"

# fuse
Expand Down
2 changes: 1 addition & 1 deletion applications/luci-app-jellyfin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

include $(TOPDIR)/rules.mk

PKG_VERSION:=1.1.8-20231208
PKG_VERSION:=1.1.9-20240117
PKG_RELEASE:=

LUCI_TITLE:=LuCI support for jellyfin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@ local paths, default_path = jellyfin_model.find_paths(blocks, home, "Caches")
for _, val in pairs(paths) do
o:value(val, val)
end
o.default = default_path

return m

0 comments on commit eb083bb

Please sign in to comment.