summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vpnbypass/luasrc
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-10-18 16:56:47 +0200
committerGitHub <noreply@github.com>2019-10-18 16:56:47 +0200
commit254503dc8a4ae7c7791ad96da835d72555796e4d (patch)
treef90a6fd79345f12f680c9a041e27dbb83445e367 /applications/luci-app-vpnbypass/luasrc
parentd5ffab23b65fc37719752d122e0d37b38f471870 (diff)
parent94b8da9e4f441e4aff001c4dca5a1a26a18527c9 (diff)
Merge pull request #3211 from stangri/master-luci-app-vpnbypass
luci-app-vpnbypass: bugfix: properly restart dnsmasq
Diffstat (limited to 'applications/luci-app-vpnbypass/luasrc')
-rw-r--r--applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
index 75c681ec44..e3c5753f4c 100644
--- a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
+++ b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
@@ -8,6 +8,7 @@ local uci = require "luci.model.uci".cursor()
local sys = require "luci.sys"
local http = require "luci.http"
local dispatcher = require "luci.dispatcher"
+local util = require "luci.util"
en = h:option(Button, "__toggle")
if enabledFlag ~= "1" then
en.title = translate("Service is disabled/stopped")
@@ -31,9 +32,9 @@ function en.write()
sys.init.start(packageName)
end
if dispatcher.lookup("admin/vpn") then
- http.redirect(dispatcher.build_url("admin/vpn/" .. packageName))
+ http.redirect(dispatcher.build_url("admin", "vpn", packageName))
else
- http.redirect(dispatcher.build_url("admin/services/" .. packageName))
+ http.redirect(dispatcher.build_url("admin", "services", packageName))
end
end
@@ -76,7 +77,7 @@ di = s4:option(DynamicList, "ipset", translate("Domains to Bypass"),
.. [[<a href="]] .. readmeURL .. [[#bypass-domains-formatsyntax" target="_blank">]]
.. translate("README") .. [[</a> ]] .. translate("for syntax"))
function d.on_after_commit(map)
- sys.init.restart("dnsmasq")
+ util.exec("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
end
return m, d