up koolddns

This commit is contained in:
sirpdboy 2021-07-13 03:09:56 +08:00
parent 26a188fa91
commit 8c8253532a
2 changed files with 2 additions and 7 deletions

View File

@ -11,7 +11,7 @@ end
function act_nslookup()
local e={}
e.index=luci.http.formvalue("index")
e.value=luci.sys.exec("nslookup %q localhost 2>&1|grep 'Address 1:'|tail -n1|cut -d' ' -f3"%luci.http.formvalue("domain"))
e.value=luci.sys.exec("nslookup %q localhost 2>&1|grep 'Address:'|tail -n1|cut -d' ' -f2"%luci.http.formvalue("domain"))
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -58,12 +58,7 @@ if t==""then return""end
local t=luci.sys.exec("ifconfig %q|grep 'inet addr'|awk '{print $2}'|cut -d: -f2"%t)or""
return t
end
e=t:option(DummyValue,"nslookupip",translate("Nslookup").." IP")
e.width="15%"
e.template="koolddns/domain"
e.cfgvalue=function(t,t)
return o
end
e=t:option(Flag,"enable",translate("Enable State"))
e.width="10%"
e.rmempty=false