add luci-app-smstool

This commit is contained in:
CN_SZTL 2019-07-29 03:08:54 +08:00
parent 2cb9217c77
commit b08e4897a2
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 67 additions and 1 deletions

View File

@ -40,7 +40,9 @@ luci-theme-netgearv2 source: [tracemouse/luci-theme-netgear](https://github.com/
luci-app-serverchan source: [zxlhhyccc/luci-app-serverchan](https://github.com/zxlhhyccc/luci-app-serverchan).<br/>
OpenAppFilter source: [destan19/OpenAppFilter](https://github.com/destan19/OpenAppFilter).<br/>
luci-app-smartinfo source: [animefansxj/luci-app-smartinfo](https://github.com/animefansxj/luci-app-smartinfo).<br/>
luci-app-koolproxy source: [Baozisoftware/luci-app-koolproxy](https://github.com/Baozisoftware/luci-app-koolproxy).
luci-app-koolproxy source: [Baozisoftware/luci-app-koolproxy](https://github.com/Baozisoftware/luci-app-koolproxy).<br/>
luci-app-k3screenctrl source: [Hill-98/luci-app-k3screenctrl](https://github.com/Hill-98/luci-app-k3screenctrl).<br/>
luci-app-smstool source: [f8q8/luci-app-smstool-master](https://github.com/f8q8/luci-app-smstool-master).
# License
### [GPL v3](https://www.gnu.org/licenses/gpl-3.0.html).

View File

@ -0,0 +1,40 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-smstool
PKG_VERSION=1.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/luci-app-smstool
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=SMS Tool for 3G Modem
PKGARCH:=all
endef
define Package/luci-app-smstool/description
This package contains sms tool for 3G Modem
endef
define Build/Prepare
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/luci-app-smstool/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view
$(INSTALL_DATA) ./files/usr/lib/lua/luci/controller/sms.lua $(1)/usr/lib/lua/luci/controller/sms.lua
$(INSTALL_DATA) ./files//usr/lib/lua/luci/view/sms.htm $(1)/usr/lib/lua/luci/view/sms.htm
endef
$(eval $(call BuildPackage,luci-app-smstool))

View File

@ -0,0 +1,10 @@
module("luci.controller.sms", package.seeall)
function index()
entry({"admin", "status", "sms"}, template("sms"), _("SMS Tool"), 100)
end
function action_sms()
luci.template.render("sms")
end

View File

@ -0,0 +1,14 @@
<%
require "luci.util"
local sms = luci.util.exec("sms_tool recv")
local signal_strength = luci.util.exec("sms_tool status")
-%>
<%+header%>
<h2><a id="content" name="content"><%:SMS%></a></h2>
Signal : <%=signal_strength:pcdata()%></br>
<div id="content_sms">
<textarea readonly="readonly" wrap="off" rows="<%=sms:cmatch("\n")+2%>" id="syslog"><%=sms:pcdata()%></textarea>
</div>
<%+footer%>