Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

allow_other option for openwrt #44

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openwrt/aliyundrive-fuse/files/aliyundrive-fuse.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ config default
option domain_id ''
option mount_point '/mnt/aliyundrive'
option read_buffer_size '10485760'
option allow_other '1'
5 changes: 5 additions & 0 deletions openwrt/aliyundrive-fuse/files/aliyundrive-fuse.init
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ start_service() {
local domain_id=$(uci_get_by_type default domain_id)
local mount_point=$(uci_get_by_type default mount_point)
local read_buf_size=$(uci_get_by_type default read_buffer_size 10485760)
local allow_other=$(uci_get_by_type default allow_other 0)

local extra_options=""

if [[ ! -z "$domain_id" ]]; then
extra_options="$extra_options --domain-id $domain_id"
fi

if [ "$allow_other" = "1" ]; then
extra_options="$extra_options --allow-other"
fi

mkdir -p "$mount_point"
procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options -S $read_buf_size --workdir /var/run/$NAME $mount_point >>/var/log/$NAME.log 2>&1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ read_buffer_size.datatype = "uinteger"
domain_id = e:option(Value, "domain_id", translate("Domain ID"))
domain_id.description = translate("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>")

allow_other = e:option(Flag, "allow_other", translate("Allow Other users Access"))
allow_other.description = translate("Allow other users to access the drive, enable this if you share with samba")
allow_other.rmempty = false

debug = e:option(Flag, "debug", translate("Debug Mode"))
debug.rmempty = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,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>"
msgstr "填写此选项将使用<a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">阿里云相册与网盘服务</a>而不是<a href=\"https://www.aliyundrive.com\" target=\"_blank\">阿里云盘</a>"

msgid "Allow Other users Access"
msgstr "允许其他用户访问"

msgid "Allow other users to access the drive, enable this if you share with samba"
msgstr "允许其他用户访问此驱动,如果你想用Samba分享请开启此开关"