summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2020-12-21 11:34:24 -0600
committerStan Grishin <stangri@melmac.net>2020-12-21 11:34:24 -0600
commit4f0506e3e9c99221ae1c2357bdc41b753960d599 (patch)
treec369e350802499bd8ce0e4750c056ef89b237c39 /applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua
parent4f1f5cfb6c240ef29c90beebe9856aa669a0e0ef (diff)
luci-app-https-dns-proxy: WebUI for dnsmasq config update, quad9 bootstrap IPv6
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua')
-rw-r--r--applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua b/applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua
index 10ce13e0cb..f7122df478 100644
--- a/applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua
+++ b/applications/luci-app-https-dns-proxy/luasrc/controller/https-dns-proxy.lua
@@ -8,18 +8,20 @@ end
function https_dns_proxy_action(name)
local packageName = "https-dns-proxy"
+ local http = require "luci.http"
+ local sys = require "luci.sys"
+ local util = require "luci.util"
if name == "start" then
- luci.sys.init.start(packageName)
+ sys.init.start(packageName)
elseif name == "action" then
- luci.util.exec("/etc/init.d/" .. packageName .. " reload >/dev/null 2>&1")
- luci.util.exec("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
+ util.exec("/etc/init.d/" .. packageName .. " reload >/dev/null 2>&1")
elseif name == "stop" then
- luci.sys.init.stop(packageName)
+ sys.init.stop(packageName)
elseif name == "enable" then
- luci.sys.init.enable(packageName)
+ sys.init.enable(packageName)
elseif name == "disable" then
- luci.sys.init.disable(packageName)
+ sys.init.disable(packageName)
end
- luci.http.prepare_content("text/plain")
- luci.http.write("0")
+ http.prepare_content("text/plain")
+ http.write("0")
end