update 2022-07-16 23:41:36
This commit is contained in:
parent
91c2ab3c3e
commit
aa38a460b6
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=aliyundrive-webdav
|
PKG_NAME:=aliyundrive-webdav
|
||||||
PKG_VERSION:=1.7.4
|
PKG_VERSION:=1.8.0
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
|
@ -7,6 +7,7 @@ config server
|
||||||
option auth_user ''
|
option auth_user ''
|
||||||
option auth_password ''
|
option auth_password ''
|
||||||
option read_buffer_size '10485760'
|
option read_buffer_size '10485760'
|
||||||
|
option upload_buffer_size '16777216'
|
||||||
option cache_size '1000'
|
option cache_size '1000'
|
||||||
option cache_ttl '600'
|
option cache_ttl '600'
|
||||||
option root '/'
|
option root '/'
|
||||||
|
@ -15,3 +16,4 @@ config server
|
||||||
option read_only '0'
|
option read_only '0'
|
||||||
option tls_cert ''
|
option tls_cert ''
|
||||||
option tls_key ''
|
option tls_key ''
|
||||||
|
option skip_upload_same_size '0'
|
||||||
|
|
|
@ -20,6 +20,7 @@ start_service() {
|
||||||
local auth_user=$(uci_get_by_type server auth_user)
|
local auth_user=$(uci_get_by_type server auth_user)
|
||||||
local auth_password=$(uci_get_by_type server auth_password)
|
local auth_password=$(uci_get_by_type server auth_password)
|
||||||
local read_buf_size=$(uci_get_by_type server read_buffer_size 10485760)
|
local read_buf_size=$(uci_get_by_type server read_buffer_size 10485760)
|
||||||
|
local upload_buf_size=$(uci_get_by_type server upload_buffer_size 16777216)
|
||||||
local cache_size=$(uci_get_by_type server cache_size 1000)
|
local cache_size=$(uci_get_by_type server cache_size 1000)
|
||||||
local cache_ttl=$(uci_get_by_type server cache_ttl 600)
|
local cache_ttl=$(uci_get_by_type server cache_ttl 600)
|
||||||
local host=$(uci_get_by_type server host 127.0.0.1)
|
local host=$(uci_get_by_type server host 127.0.0.1)
|
||||||
|
@ -29,7 +30,7 @@ start_service() {
|
||||||
local tls_cert=$(uci_get_by_type server tls_cert)
|
local tls_cert=$(uci_get_by_type server tls_cert)
|
||||||
local tls_key=$(uci_get_by_type server tls_key)
|
local tls_key=$(uci_get_by_type server tls_key)
|
||||||
|
|
||||||
local extra_options="-I"
|
local extra_options="--auto-index"
|
||||||
|
|
||||||
if [[ ! -z "$domain_id" ]]; then
|
if [[ ! -z "$domain_id" ]]; then
|
||||||
extra_options="$extra_options --domain-id $domain_id"
|
extra_options="$extra_options --domain-id $domain_id"
|
||||||
|
@ -47,6 +48,13 @@ start_service() {
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$(uci_get_by_type server skip_upload_same_size 0)" in
|
||||||
|
1|on|true|yes|enabled)
|
||||||
|
extra_options="$extra_options --skip-upload-same-size"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$tls_cert" && ! -z "$tls_key" ]]; then
|
if [[ ! -z "$tls_cert" && ! -z "$tls_key" ]]; then
|
||||||
|
@ -54,7 +62,7 @@ start_service() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --cache-ttl $cache_ttl --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1"
|
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root --read-buffer-size $read_buf_size --upload-buffer-size $upload_buf_size --cache-size $cache_size --cache-ttl $cache_ttl --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1"
|
||||||
procd_set_param pidfile /var/run/$NAME.pid
|
procd_set_param pidfile /var/run/$NAME.pid
|
||||||
procd_set_param env REFRESH_TOKEN="$refresh_token"
|
procd_set_param env REFRESH_TOKEN="$refresh_token"
|
||||||
[[ ! -z "$auth_user" ]] && procd_append_param env WEBDAV_AUTH_USER="$auth_user"
|
[[ ! -z "$auth_user" ]] && procd_append_param env WEBDAV_AUTH_USER="$auth_user"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-aliyundrive-webdav
|
PKG_NAME:=luci-app-aliyundrive-webdav
|
||||||
PKG_VERSION:=1.7.4
|
PKG_VERSION:=1.8.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,14 @@ read_buffer_size = e:option(Value, "read_buffer_size", translate("Read Buffer Si
|
||||||
read_buffer_size.default = "10485760"
|
read_buffer_size.default = "10485760"
|
||||||
read_buffer_size.datatype = "uinteger"
|
read_buffer_size.datatype = "uinteger"
|
||||||
|
|
||||||
|
upload_buffer_size = e:option(Value, "upload_buffer_size", translate("Upload Buffer Size"))
|
||||||
|
upload_buffer_size.default = "16777216"
|
||||||
|
upload_buffer_size.datatype = "uinteger"
|
||||||
|
|
||||||
|
skip_upload_same_size = e:option(Flag, "skip_upload_same_size", translate("Skip uploading same size files"))
|
||||||
|
skip_upload_same_size.description = translate("Reduce the upload traffic by skipping uploading files with the same size")
|
||||||
|
skip_upload_same_size.rmempty = false
|
||||||
|
|
||||||
cache_size = e:option(Value, "cache_size", translate("Cache Size"))
|
cache_size = e:option(Value, "cache_size", translate("Cache Size"))
|
||||||
cache_size.default = "1000"
|
cache_size.default = "1000"
|
||||||
cache_size.datatype = "uinteger"
|
cache_size.datatype = "uinteger"
|
||||||
|
|
|
@ -37,6 +37,9 @@ msgstr "密码"
|
||||||
msgid "Read Buffer Size"
|
msgid "Read Buffer Size"
|
||||||
msgstr "下载缓冲大小(bytes)"
|
msgstr "下载缓冲大小(bytes)"
|
||||||
|
|
||||||
|
msgid "Upload Buffer Size"
|
||||||
|
msgstr "上传缓冲大小(bytes)"
|
||||||
|
|
||||||
msgid "Cache Size"
|
msgid "Cache Size"
|
||||||
msgstr "目录缓存大小"
|
msgstr "目录缓存大小"
|
||||||
|
|
||||||
|
@ -84,3 +87,9 @@ msgstr "阿里云相册与云盘服务 domainId"
|
||||||
|
|
||||||
msgid "Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>"
|
msgid "Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>"
|
||||||
msgstr "填写此选项将使用<a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">阿里云相册与网盘服务</a>而不是<a href=\"https://www.aliyundrive.com\" target=\"_blank\">阿里云盘</a>"
|
msgstr "填写此选项将使用<a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">阿里云相册与网盘服务</a>而不是<a href=\"https://www.aliyundrive.com\" target=\"_blank\">阿里云盘</a>"
|
||||||
|
|
||||||
|
msgid "Skip uploading same size files"
|
||||||
|
msgstr "跳过上传相同大小的文件"
|
||||||
|
|
||||||
|
msgid "Reduce the upload traffic by skipping uploading files with the same size"
|
||||||
|
msgstr "跳过上传相同大小的文件减少上传流量消耗,但可能会导致修改过的同样大小的文件不会被上传"
|
||||||
|
|
Loading…
Reference in New Issue