luci-app-baidupcs-web: move to nas
This commit is contained in:
parent
cb8c0018d1
commit
5797bed33d
@ -5,6 +5,6 @@ function index()
|
||||
return
|
||||
end
|
||||
local page
|
||||
page = entry({"admin", "services", "baidupcs-web"}, cbi("baidupcs-web"), _("百度网盘管理"), 100)
|
||||
page = entry({"admin", "nas", "baidupcs-web"}, cbi("baidupcs-web"), _("百度网盘管理"), 100)
|
||||
page.dependent = true
|
||||
end
|
||||
|
||||
@ -74,7 +74,7 @@ function refresh_data()
|
||||
else
|
||||
retstring ="-1"
|
||||
end
|
||||
luci.sys.exec("rm -f /tmp/gfwnew.txt ")
|
||||
luci.sys.exec("rm -f /tmp/gfwnew.txt")
|
||||
else
|
||||
retstring ="-1"
|
||||
end
|
||||
@ -93,7 +93,7 @@ function refresh_data()
|
||||
else
|
||||
retstring ="-1"
|
||||
end
|
||||
luci.sys.exec("rm -f /tmp/china_ssr.txt ")
|
||||
luci.sys.exec("rm -f /tmp/china_ssr.txt")
|
||||
else
|
||||
local need_process = 0
|
||||
if nixio.fs.access("/usr/bin/wget-ssl") then
|
||||
@ -137,7 +137,7 @@ end
|
||||
|
||||
function check_port()
|
||||
local set=""
|
||||
local retstring="<br /><br />"
|
||||
local retstring="<br/><br/>"
|
||||
local s
|
||||
local server_name = ""
|
||||
local shadowsocksr = "shadowsocksr"
|
||||
@ -150,19 +150,19 @@ function check_port()
|
||||
elseif s.server and s.server_port then
|
||||
server_name= "%s:%s" %{s.server, s.server_port}
|
||||
end
|
||||
iret=luci.sys.call(" ipset add ss_spec_wan_ac " .. s.server .. " 2>/dev/null")
|
||||
iret=luci.sys.call("ipset add ss_spec_wan_ac " .. s.server .. " 2>/dev/null")
|
||||
socket = nixio.socket("inet", "stream")
|
||||
socket:setopt("socket", "rcvtimeo", 3)
|
||||
socket:setopt("socket", "sndtimeo", 3)
|
||||
ret=socket:connect(s.server,s.server_port)
|
||||
if tostring(ret) == "true" then
|
||||
socket:close()
|
||||
retstring =retstring .. "<font color='green'>[" .. server_name .. "] OK.</font><br />"
|
||||
retstring =retstring .. "<font color='green'>[" .. server_name .. "] OK.</font><br/>"
|
||||
else
|
||||
retstring =retstring .. "<font color='red'>[" .. server_name .. "] Error.</font><br />"
|
||||
retstring =retstring .. "<font color='red'>[" .. server_name .. "] Error.</font><br/>"
|
||||
end
|
||||
if iret== 0 then
|
||||
luci.sys.call(" ipset del ss_spec_wan_ac " .. s.server)
|
||||
luci.sys.call("ipset del ss_spec_wan_ac " .. s.server)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user