diff options
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.lua | 18 |
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 |