diff options
author | Stan Grishin <stangri@melmac.net> | 2019-10-28 16:34:54 -0700 |
---|---|---|
committer | Stan Grishin <stangri@melmac.net> | 2019-10-28 16:34:54 -0700 |
commit | c145ad0cbf9bd71ef162772bcd3d4622f4023351 (patch) | |
tree | a4e678e05f6db36908c0befe541ffc8522883f98 /applications/luci-app-vpnbypass/luasrc/controller | |
parent | 7707b679e20df9806fbcbc58d12116f9ee9a3850 (diff) |
luci-app-vpnbypass: bugfix: call to action has no parent node
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-vpnbypass/luasrc/controller')
-rw-r--r-- | applications/luci-app-vpnbypass/luasrc/controller/vpnbypass.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/applications/luci-app-vpnbypass/luasrc/controller/vpnbypass.lua b/applications/luci-app-vpnbypass/luasrc/controller/vpnbypass.lua index d034fce324..dac02d84d6 100644 --- a/applications/luci-app-vpnbypass/luasrc/controller/vpnbypass.lua +++ b/applications/luci-app-vpnbypass/luasrc/controller/vpnbypass.lua @@ -1,12 +1,10 @@ module("luci.controller.vpnbypass", package.seeall) function index() if nixio.fs.access("/etc/config/vpnbypass") then - if luci.dispatcher.lookup("admin/vpn") then - entry({"admin", "vpn", "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass")) - else - entry({"admin", "services", "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass")) - end - entry({"admin", "services", "vpnbypass", "action"}, call("vpnbypass_action"), nil).leaf = true + local node = "services" + if luci.dispatcher.lookup("admin/vpn") then node = "vpn" end + entry({"admin", node, "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass")) + entry({"admin", node, "vpnbypass", "action"}, call("vpnbypass_action"), nil).leaf = true end end |