gowebdav: fix typo error

This commit is contained in:
CN_SZTL 2020-04-20 18:31:58 +08:00
parent a99b0f9add
commit 7ed1181870
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 10 additions and 8 deletions

View File

@ -7,4 +7,6 @@ config gowebdav 'config'
option root_dir '/mnt'
option read_only '0'
option allow_wan '0'
option use_https '0'
option use_https '0'
option cert_cer ''
option cert_key ''

View File

@ -14,7 +14,7 @@ init_conf() {
config_get "read_only" "config" "read_only" "0"
config_get "allow_wan" "config" "allow_wan" "0"
config_get "use_https" "config" "use_https" "0"
config_get "cert_crt" "config" "cert_crt"
config_get "cert_cer" "config" "cert_cer"
config_get "cert_key" "config" "cert_key"
config_load "network"
@ -44,7 +44,7 @@ start() {
[ "${allow_wan}" -ne "1" ] && listen_addr="${lan_addr}" || { listen_addr="0.0.0.0"; set_type="start" && set_firewall 2>"/dev/null"; }
{ [ -n "${username}" ] && [ -n "${password}" ]; } && auth_arg="-user ${username} -password ${password}"
[ "${read_only}" -eq "1" ] && readonly_arg="-read-only"
{ [ "${use_https}" -eq "1" ] && [ -e "${cert_crt}" ] && [ -e "${cert_key}" ]; } && https_arg="-https-mode -https-cert-file ${cert_crt} -https-key-file ${cert_key}"
{ [ "${use_https}" -eq "1" ] && [ -e "${cert_cer}" ] && [ -e "${cert_key}" ]; } && https_arg="-https-mode -https-cert-file ${cert_cer} -https-key-file ${cert_key}"
/usr/bin/gowebdav -dir "${root_dir}" -http "${listen_addr}:${listen_port}" ${auth_arg} ${readonly_arg} ${https_arg} &
}
@ -53,4 +53,4 @@ stop() {
set_type="stop" && set_firewall 2>"/dev/null"
killall "gowebdav" 2>"/dev/null"
}
}

View File

@ -12,7 +12,7 @@ s.anonymous = true
enable = s:option(Flag, "enable", translate("Enable"))
enable.rmempty = false
listen_port = s:option(Value, "port", translate("Listen Port"))
listen_port = s:option(Value, "listen_port", translate("Listen Port"))
listen_port.placeholder = 6086
listen_port.default = 6086
listen_port.datatype = "port"
@ -45,9 +45,9 @@ allow_wan.rmempty = false
use_https = s:option(Flag, "use_https", translate("Use HTTPS instead of HTTP"))
use_https.rmempty = false
cert_crt = s:option(Value, "cert_crt", translate("Path to Certificate"))
cert_crt.datatype = "file"
cert_crt:depends("use_https", 1)
cert_cer = s:option(Value, "cert_cer", translate("Path to Certificate"))
cert_cer.datatype = "file"
cert_cer:depends("use_https", 1)
cert_key = s:option(Value, "cert_key", translate("Path to Certificate Key"))
cert_key.datatype = "file"