luci-app-rclone: fix typo (fix #20)

This commit is contained in:
CN_SZTL 2020-01-25 17:40:21 +08:00
parent 540d17eacb
commit c9c2fdffb4
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -12,13 +12,13 @@ local running = (luci.sys.call('pidof rclone > /dev/null') == 0)
local state_msg = ''
local trport = uci:get('rclone', 'config', 'port')
local triptype = uci.get('rclone', 'config', 'addr_type')
local triptype = uci:get('rclone', 'config', 'addr_type')
local trip = ''
if triptype == 'local' then
trip = uci.get('network', 'loopback', 'ipaddr')
trip = uci:get('network', 'loopback', 'ipaddr')
elseif triptype == 'lan' then
trip = uci.get('network', 'lan', 'ipaddr')
trip = uci:get('network', 'lan', 'ipaddr')
else
trip = '[ip]'
end
@ -82,7 +82,7 @@ end
function Download()
local t,e
t=nixio.open(uci.get('rclone', 'config', 'config_path'),"r")
t=nixio.open(uci:get('rclone', 'config', 'config_path'),"r")
luci.http.header('Content-Disposition','attachment; filename="rclone.conf"')
luci.http.prepare_content("application/octet-stream")
while true do