From ffeaf944c93b1f8219c132833224bb4d7d236850 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 20 Apr 2020 18:31:58 +0800 Subject: [PATCH] gowebdav: fix typo error --- package/ctcgfw/gowebdav/files/gowebdav.config | 4 +++- package/ctcgfw/gowebdav/files/gowebdav.init | 6 +++--- .../luci-app-gowebdav/luasrc/model/cbi/gowebdav.lua | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package/ctcgfw/gowebdav/files/gowebdav.config b/package/ctcgfw/gowebdav/files/gowebdav.config index 073fada49b..33a3c4ae65 100644 --- a/package/ctcgfw/gowebdav/files/gowebdav.config +++ b/package/ctcgfw/gowebdav/files/gowebdav.config @@ -7,4 +7,6 @@ config gowebdav 'config' option root_dir '/mnt' option read_only '0' option allow_wan '0' - option use_https '0' \ No newline at end of file + option use_https '0' + option cert_cer '' + option cert_key '' diff --git a/package/ctcgfw/gowebdav/files/gowebdav.init b/package/ctcgfw/gowebdav/files/gowebdav.init index 746f0f247c..e0df0143b0 100755 --- a/package/ctcgfw/gowebdav/files/gowebdav.init +++ b/package/ctcgfw/gowebdav/files/gowebdav.init @@ -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" -} \ No newline at end of file +} diff --git a/package/ctcgfw/luci-app-gowebdav/luasrc/model/cbi/gowebdav.lua b/package/ctcgfw/luci-app-gowebdav/luasrc/model/cbi/gowebdav.lua index 7fe4a92d11..a93f8de044 100644 --- a/package/ctcgfw/luci-app-gowebdav/luasrc/model/cbi/gowebdav.lua +++ b/package/ctcgfw/luci-app-gowebdav/luasrc/model/cbi/gowebdav.lua @@ -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"