let luci app wrtbwmon compatible with Flowoffload

This commit is contained in:
coolsnowwolf 2018-11-05 13:59:28 +08:00
parent 30b413b43a
commit 69a76b3999
5 changed files with 15 additions and 5 deletions

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for Wrtbwmon
LUCI_DEPENDS:=+luci-app-nlbwmon
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=5
PKG_RELEASE:=6
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -2,8 +2,8 @@ local m = Map("wrtbwmon", "详细设置")
local s = m:section(NamedSection, "general", "wrtbwmon", "通用设置")
local o = s:option(Flag, "persist", "写入数据库到ROM",
"把统计数据写入 /etc/config 中避免重启或者升级后丢失 (需要占用ROM空间并降低闪存寿命")
local o = s:option(Flag, "persist", "写入数据库到 ROM",
"把统计数据写入 /etc/config 中避免重启或者升级后丢失 (需要占用 ROM 空间并降低闪存寿命)")
o.rmempty = false
function o.write(self, section, value)

View File

@ -1,5 +1,5 @@
<%+header%>
<h2>客户端实时流量监测 (暂不兼容SFE和FLOW加速)</h2>
<h2>客户端实时流量监测</h2>
<p style="position:relative;">
<button id="resetDatabase" class="cbi-button" style="position:absolute;right:0;bottom:0;">重置统计数据库</button>
</p>
@ -29,7 +29,7 @@
</label>
<br/>
<label>
<small>合并计算MAC地址相同的客户端流量</small>
<small>合并计算客户端流量</small>
<input id="perHostTotals" type="checkbox" style="vertical-align:middle;"/>
</label>
<!-- label>

View File

@ -1,5 +1,14 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete firewall.wrtbwmon
set firewall.wrtbwmon=include
set firewall.wrtbwmon.type=script
set firewall.wrtbwmon.path='/etc/wrtbwmon.include'
set firewall.wrtbwmon.reload=1
commit firewall
EOF
/etc/init.d/wrtbwmon enable
/etc/init.d/wrtbwmon start
exit 0

View File

@ -0,0 +1 @@
/etc/init.d/wrtbwmon restart