luci-app-mosdns: fix geo_update command exit code
This commit is contained in:
parent
c560c66335
commit
1ac2cf5f36
@ -16,7 +16,7 @@ function index()
|
||||
entry({"admin", "services", "mosdns", "status"}, call("act_status")).leaf = true
|
||||
entry({"admin", "services", "mosdns", "get_log"}, call("get_log")).leaf = true
|
||||
entry({"admin", "services", "mosdns", "clear_log"}, call("clear_log")).leaf = true
|
||||
entry({"admin", "services", "mosdns", "geo_update"}, call("geo_update"))
|
||||
entry({"admin", "services", "mosdns", "geo_update"}, call("geo_update")).leaf = true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
@ -36,7 +36,7 @@ end
|
||||
|
||||
function geo_update()
|
||||
local e = {}
|
||||
e.updating = luci.sys.call("/usr/share/mosdns/mosdns.sh geodata") == 0
|
||||
e.updating = luci.sys.call("/usr/share/mosdns/mosdns.sh geodata >/dev/null") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user