diff --git a/package/lean/luci-app-softethervpn/Makefile b/package/lean/luci-app-softethervpn/Makefile
index 236ed1e7b..5636c5c1c 100644
--- a/package/lean/luci-app-softethervpn/Makefile
+++ b/package/lean/luci-app-softethervpn/Makefile
@@ -9,10 +9,8 @@ LUCI_TITLE:=LuCI support for SoftEtherVPN
LUCI_DEPENDS:=+zlib +libpthread +librt +libreadline +libncurses +libiconv-full +kmod-tun +libopenssl +softethervpn5-bridge +softethervpn5-client +softethervpn5-server
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
-
-
diff --git a/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua b/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua
index 8a5dd036f..e51b3435a 100644
--- a/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua
+++ b/package/lean/luci-app-softethervpn/luasrc/controller/softethervpn.lua
@@ -6,13 +6,13 @@ function index()
end
entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false
- entry({"admin", "vpn", "softethervpn"}, cbi("softethervpn"), _("SoftEther VPN"), 50).dependent = true
- entry({"admin", "vpn", "softethervpn", "status"}, call("status")).leaf = true
+ entry({"admin", "vpn", "softethervpn"}, cbi("softethervpn"), _("SoftEther VPN Service"), 50).dependent = true
+ entry({"admin", "vpn", "softethervpn", "status"}, call("act_status")).leaf = true
end
-function status()
- local e={}
- e.status=luci.sys.call("pidof %s >/dev/null"%"vpnserver")==0
+function act_status()
+ local e = {}
+ e.running = luci.sys.call("pidof vpnserver >/dev/null") == 0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
diff --git a/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua b/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua
index 5529c82fb..1a25ebe92 100644
--- a/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua
+++ b/package/lean/luci-app-softethervpn/luasrc/model/cbi/softethervpn.lua
@@ -1,14 +1,18 @@
-local s=require"luci.sys"
+local s = require"luci.sys"
local m,s,o
-m=Map("softethervpn",translate("SoftEther VPN"))
+
+m = Map("softethervpn")
+m.title = translate("SoftEther VPN Service")
m.description = translate("SoftEther VPN is an open source, cross-platform, multi-protocol virtual private network solution developed by university of tsukuba graduate student Daiyuu Nobori for master's thesis.
can easily set up OpenVPN, IPsec, L2TP, ms-sstp, L2TPv3 and EtherIP servers on the router using the console.")
-m.template="softethervpn/index"
-s=m:section(TypedSection,"softether")
-s.anonymous=true
-o=s:option(DummyValue,"softethervpn_status",translate("Current Condition"))
-o.template="softethervpn/status"
-o.value=translate("Collecting data...")
-o=s:option(Flag,"enable",translate("Enabled"))
-o.rmempty=false
-o=s:option(DummyValue,"moreinfo",translate("控制台下载:
Windows-x86_x64-intel.exe
macos-x86-32bit.pkg"))
+
+m:section(SimpleSection).template = "softethervpn/softethervpn_status"
+
+s = m:section(TypedSection, "softether")
+s.anonymous = true
+
+o = s:option(Flag, "enable", translate("Enabled"))
+o.rmempty = false
+
+o = s:option(DummyValue, "moreinfo", translate("控制台下载:
Windows-x86_x64-intel.exe
macos-x86-32bit.pkg"))
+
return m
diff --git a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/index.htm b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/index.htm
deleted file mode 100644
index 273f604ea..000000000
--- a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/index.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<%#
- Copyright (C) 2018-2019 Lienol
- Licensed to the public under the Apache License 2.0.
--%>
-
-<% include("cbi/map") %>
-
diff --git a/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/softethervpn_status.htm b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/softethervpn_status.htm
new file mode 100644
index 000000000..9aa1e647c
--- /dev/null
+++ b/package/lean/luci-app-softethervpn/luasrc/view/softethervpn/softethervpn_status.htm
@@ -0,0 +1,22 @@
+
+
+