mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-09 09:47:28 +08:00
update
This commit is contained in:
parent
6c89a14b5f
commit
5575a64d37
@ -1,18 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 mleaf <mleaf90@gmail.com>
|
||||
# 微信公众号【WiFi物联网】
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI Support for Mwol
|
||||
LUCI_DEPENDS:=+mwol
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
@ -1,11 +0,0 @@
|
||||
--Copyright (C) 2019 mleaf <mleaf90@gmail.com>
|
||||
--微信公众号【WiFi物联网】
|
||||
module("luci.controller.mwol",package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/mwol") then
|
||||
return
|
||||
end
|
||||
local page = entry({"admin", "services", "mwol"}, cbi("mwol"), _("Mwol"))
|
||||
page.dependent = true
|
||||
end
|
@ -1,139 +0,0 @@
|
||||
--Copyright (C) 2019 mleaf <mleaf90@gmail.com>
|
||||
--微信公众号【WiFi物联网】
|
||||
local NXFS = require "nixio.fs"
|
||||
local SYS = require "luci.sys"
|
||||
local HTTP = require "luci.http"
|
||||
local DISP = require "luci.dispatcher"
|
||||
local Status,subTopic,pubTopic
|
||||
local m,s
|
||||
local e,mwol
|
||||
local encryption
|
||||
local sys = require "luci.sys"
|
||||
|
||||
local mac=luci.sys.exec("uci -q get mwol.mwol_conf.id")
|
||||
|
||||
m=Map("mwol",translate("Mqtt wake on lan"),translate("请关注微信公众号【WiFi物联网】获取更多信息: \
|
||||
<a href=\"http://www.mleaf.org/downloads/logo/201911171573997716658567.jpg\" target=\"_blank\">【WiFi物联网】</a>"))
|
||||
|
||||
if SYS.call("pidof mwol >/dev/null") == 0 then
|
||||
Status = translate("<strong><font color=\"green\">Mwol正在运行...</font></strong>")
|
||||
else
|
||||
Status = translate("<strong><font color=\"red\">Mwol未运行...</font></strong>")
|
||||
end
|
||||
|
||||
subTopic=string.format("<strong><font color=\"red\">Mwol订阅消息主题: /mwol/%s</font></strong>", mac)
|
||||
pubTopic=string.format("<strong><font color=\"red\">Mwol发布消息主题: /mwol/%s</font></strong>", mac)
|
||||
|
||||
--
|
||||
-- LoRa Gateway config for gateway_conf
|
||||
--
|
||||
mwol=m:section(TypedSection,"mwol","")
|
||||
--mwol.addremove=false
|
||||
mwol.anonymous=true
|
||||
mwol.description = translate(string.format("%s<br /><br />%s<br><br />%s", Status, subTopic, pubTopic))
|
||||
|
||||
mwol:tab("general", translate("General Settings"))
|
||||
mwol:tab("encryptionSettings", translate("Encryption Settings"))
|
||||
mwol:tab("ssl", translate("SSL Settings"))
|
||||
|
||||
--
|
||||
-- MQTT general
|
||||
--
|
||||
e = mwol:taboption("general", Flag, "enable")
|
||||
e.title = translate("Enable")
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
|
||||
e = mwol:taboption("general", Value, "hostname")
|
||||
e.title = translate("MQTT Server")
|
||||
e = mwol:taboption("general", Value, "port")
|
||||
e.title = translate("MQTT Port")
|
||||
|
||||
host = mwol:taboption("general", Value, "presetmac", translate("Host to wake up"),
|
||||
translate("Choose the host to wake up or enter a custom MAC address to use"))
|
||||
host.title = translate("Preset Mac")
|
||||
sys.net.mac_hints(function(mac, name)
|
||||
host:value(mac, "%s (%s)" %{ mac, name })
|
||||
end)
|
||||
|
||||
e = mwol:taboption("general", Value, "id")
|
||||
e.default = mac
|
||||
e.rmempty = false;
|
||||
e.title = translate("MQTT Topic Id")
|
||||
|
||||
--
|
||||
-- MQTT Using encryption
|
||||
--
|
||||
encryption_enable = mwol:taboption("encryptionSettings", ListValue,"encryptionenable",translate("Enable"))
|
||||
encryption_enable.optional = false;
|
||||
encryption_enable.rmempty = false;
|
||||
encryption_enable.default = 0
|
||||
encryption_enable.datatype = "uinteger"
|
||||
encryption_enable:value(1, translate("True"))
|
||||
encryption_enable:value(0, translate("False"))
|
||||
|
||||
--
|
||||
-- MQTT username
|
||||
--
|
||||
encryption_username = mwol:taboption("encryptionSettings", Value,"username",translate("MQTT UserName"))
|
||||
encryption_username.optional = true;
|
||||
encryption_username.rmempty = true;
|
||||
encryption_username.default = "mleaf"
|
||||
encryption_username.datatype = "string"
|
||||
encryption_username:depends("encryptionenable", "1")
|
||||
|
||||
--
|
||||
-- MQTT password
|
||||
--
|
||||
encryption_password = mwol:taboption("encryptionSettings", Value,"password",translate("MQTT Password"))
|
||||
encryption_password.optional = true;
|
||||
encryption_password.rmempty = true;
|
||||
encryption_password.default = "www.mleaf.org"
|
||||
encryption_password.datatype = "string"
|
||||
encryption_password:depends("encryptionenable", "1")
|
||||
|
||||
--
|
||||
-- MQTT Using SSL
|
||||
--
|
||||
ssl_enable = mwol:taboption("ssl", ListValue,"sslenable",translate("Enable"))
|
||||
ssl_enable.optional = false;
|
||||
ssl_enable.rmempty = false;
|
||||
ssl_enable.default = 0
|
||||
ssl_enable.datatype = "uinteger"
|
||||
ssl_enable:value(1, translate("True"))
|
||||
ssl_enable:value(0, translate("False"))
|
||||
|
||||
--
|
||||
-- MQTT cafile
|
||||
--
|
||||
cafile = mwol:taboption("ssl", Value,"cafile",translate("ca"),
|
||||
translate("Edit the ca file path."))
|
||||
cafile.optional = true;
|
||||
cafile.rmempty = true;
|
||||
cafile.default = false
|
||||
cafile.datatype = "string"
|
||||
cafile:depends("sslenable", "1")
|
||||
|
||||
--
|
||||
-- MQTT crtfile
|
||||
--
|
||||
crtfile = mwol:taboption("ssl", Value,"crtfile",translate("crt"),
|
||||
translate("Edit the crt file path."))
|
||||
crtfile.optional = true;
|
||||
crtfile.rmempty = true;
|
||||
crtfile.default = false
|
||||
crtfile.datatype = "string"
|
||||
crtfile:depends("sslenable", "1")
|
||||
|
||||
--
|
||||
-- MQTT keyfile
|
||||
--
|
||||
keyfile = mwol:taboption("ssl", Value,"keyfile",translate("key"),
|
||||
translate("Edit the key file path."))
|
||||
keyfile.optional = true;
|
||||
keyfile.rmempty = true;
|
||||
keyfile.default = false
|
||||
keyfile.datatype = "string"
|
||||
keyfile:depends("sslenable", "1")
|
||||
|
||||
return m
|
@ -1,54 +0,0 @@
|
||||
|
||||
msgid "Mwol Plus is Running"
|
||||
msgstr "Mwol正在运行"
|
||||
|
||||
msgid "Mwol Plus is Not Running"
|
||||
msgstr "Mwol未运行"
|
||||
|
||||
msgid "Mwol Sub Topic:"
|
||||
msgstr "Mwol订阅消息主题:"
|
||||
|
||||
msgid "Mwol Pub Topic:"
|
||||
msgstr "Mwol发布消息主题:"
|
||||
|
||||
msgid "General Settings"
|
||||
msgstr "通用设置"
|
||||
|
||||
msgid "Encryption Settings"
|
||||
msgstr "加密设定"
|
||||
|
||||
msgid "SSL Settings"
|
||||
msgstr "SSL证书设置"
|
||||
|
||||
msgid "Enable"
|
||||
msgstr "开启"
|
||||
|
||||
msgid "MQTT Server"
|
||||
msgstr "MQTT服务器"
|
||||
|
||||
msgid "MQTT Port"
|
||||
msgstr "MQTT端口"
|
||||
|
||||
msgid "Preset Mac"
|
||||
msgstr "预设MAC地址"
|
||||
|
||||
msgid "Choose the host to wake up or enter a custom MAC address to use"
|
||||
msgstr "选择一个需要唤醒的主机或自定义唤醒主机的mac地址"
|
||||
|
||||
msgid "MQTT Topic Id"
|
||||
msgstr "MQTT主题ID"
|
||||
|
||||
msgid "MQTT UserName"
|
||||
msgstr "MQTT用户名"
|
||||
|
||||
msgid "MQTT Password"
|
||||
msgstr "MQTT密码"
|
||||
|
||||
msgid "Edit the ca file path."
|
||||
msgstr "编辑CA路径。"
|
||||
|
||||
msgid "Edit the crt file path."
|
||||
msgstr "编辑CRT路径。"
|
||||
|
||||
msgid "Edit the key file path."
|
||||
msgstr "编辑KEY路径。"
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@mwol[-1]
|
||||
add ucitrack mwol
|
||||
set ucitrack.@mwol[-1].init=mwol
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"luci-app-mwol": {
|
||||
"description": "Grant UCI access for luci-app-mwol",
|
||||
"read": {
|
||||
"uci": [ "mwol" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "mwol" ]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user