summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-01-26 16:21:49 +0200
committerGitHub <noreply@github.com>2018-01-26 16:21:49 +0200
commit00262be237b5a346137d07b3ae8a45d45b61d403 (patch)
tree8ff5f47f95148c99caf306c40181b73665ee5682 /applications
parentee409b66ce8911651a985c6e38690c486fefe1d1 (diff)
parent1fd24f3fd8836287a418a8f09adc3f0dec04a9d2 (diff)
Merge pull request #1596 from stangri/luci-app-vpnbypass
luci-app-vpnbypass: better service start/stop
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-vpnbypass/Makefile5
-rw-r--r--applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua14
-rw-r--r--applications/luci-app-vpnbypass/po/templates/vpnbypass.pot6
3 files changed, 9 insertions, 16 deletions
diff --git a/applications/luci-app-vpnbypass/Makefile b/applications/luci-app-vpnbypass/Makefile
index 0ca74ae38..838840e6b 100644
--- a/applications/luci-app-vpnbypass/Makefile
+++ b/applications/luci-app-vpnbypass/Makefile
@@ -7,9 +7,10 @@ PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
LUCI_TITLE:=VPN Bypass Web UI
-LUCI_DEPENDS:=+vpnbypass
+LUCI_DESCRIPTION:=Provides Web UI for VPNBypass service.
+LUCI_DEPENDS:=+luci +vpnbypass
LUCI_PKGARCH:=all
-PKG_RELEASE:=1
+PKG_RELEASE:=3
include ../../luci.mk
diff --git a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
index bb27b6381..9d2f5f425 100644
--- a/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
+++ b/applications/luci-app-vpnbypass/luasrc/model/cbi/vpnbypass.lua
@@ -4,19 +4,11 @@ m = Map("vpnbypass", translate("VPN Bypass Settings"))
s = m:section(NamedSection, "config", "vpnbypass")
-- General options
-e = s:option(Flag, "enabled", translate("Enable/start service"))
+e = s:option(Flag, "enabled", translate("Start VPNBypass service"))
e.rmempty = false
-
-function e.cfgvalue(self, section)
- return self.map:get(section, "enabled") == "1" and luci.sys.init.enabled("vpnbypass") and self.enabled or self.disabled
-end
-
function e.write(self, section, value)
- if value == "1" then
- luci.sys.call("/etc/init.d/vpnbypass enable >/dev/null")
- luci.sys.call("/etc/init.d/vpnbypass start >/dev/null")
- else
- luci.sys.call("/etc/init.d/vpnbypass stop >/dev/null")
+ if value ~= "1" then
+ luci.sys.init.stop("vpnbypass")
end
return Flag.write(self, section, value)
end
diff --git a/applications/luci-app-vpnbypass/po/templates/vpnbypass.pot b/applications/luci-app-vpnbypass/po/templates/vpnbypass.pot
index fd92b5e8a..c14c02fe9 100644
--- a/applications/luci-app-vpnbypass/po/templates/vpnbypass.pot
+++ b/applications/luci-app-vpnbypass/po/templates/vpnbypass.pot
@@ -7,9 +7,6 @@ msgstr ""
msgid "Domains to be accessed directly (outside of the VPN tunnel), see"
msgstr ""
-msgid "Enable/start service"
-msgstr ""
-
msgid "Local IP Addresses to Bypass"
msgstr ""
@@ -41,6 +38,9 @@ msgstr ""
msgid "Remote ports to trigger VPN Bypass"
msgstr ""
+msgid "Start VPNBypass service"
+msgstr ""
+
msgid "VPN Bypass"
msgstr ""