update-09.14

This commit is contained in:
github-actions[bot] 2021-09-14 23:22:14 +08:00
parent 9e481523bc
commit ad7053c6ce
18 changed files with 39 additions and 23 deletions

View File

@ -43,7 +43,20 @@ define Package/$(PKG_NAME)/conffiles
/etc/config/aliyundrive-webdav
endef
define Download/sha256sum
FILE:=$(PKG_SOURCE).sha256
URL_FILE:=$(FILE)
URL:=$(PKG_SOURCE_URL)
HASH:=skip
endef
$(eval $(call Download,sha256sum))
define Build/Prepare
mv $(DL_DIR)/$(PKG_SOURCE).sha256 .
cp $(DL_DIR)/$(PKG_SOURCE) .
shasum -a 256 -c $(PKG_SOURCE).sha256
rm $(PKG_SOURCE).sha256 $(PKG_SOURCE)
tar -C $(PKG_BUILD_DIR)/ -zxf $(DL_DIR)/$(PKG_SOURCE)
endef

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-dnsfilter
PKG_VERSION:=1.0
PKG_RELEASE:=10
PKG_RELEASE:=11
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=small_5 kiddin9

View File

@ -3,7 +3,7 @@ function index()
if not nixio.fs.access("/etc/config/dnsfilter") then
return
end
local page = entry({"admin","services","dnsfilter"},alias("admin","services","dnsfilter","base"),_("DNSFilter"),9)
local page = entry({"admin","services","dnsfilter"},alias("admin","services","dnsfilter","base"),_("DNS Filter"),9)
page.dependent = true
page.acl_depends = { "luci-app-dnsfilter" }
entry({"admin","services","dnsfilter","base"},cbi("dnsfilter/base"),_("Base Setting"),10).leaf=true

View File

@ -1,7 +1,7 @@
local SYS=require "luci.sys"
m=Map("dnsfilter")
m.title=translate("DNSFilter")
m.title=translate("DNS Filter")
m.description=translate("Support AdGuardHome/Host/DNSMASQ/Domain Rules")
m:section(SimpleSection).template="dnsfilter/dnsfilter_status"
@ -26,9 +26,9 @@ o=s:option(Flag,"cron_mode")
o.title=translate("Enable automatic update rules")
o=s:option(ListValue,"time_update")
o.title=translate("Update time")
o.title=translate("Update time (every day)")
for s=0,23 do
o:value(s)
o:value(s, s .. ':00')
end
o.default=6
o:depends("cron_mode",1)
@ -40,7 +40,7 @@ UD=SYS.exec("cat /tmp/dnsfilter/dnsfilter.updated 2>/dev/null")
rule_count=tonumber(SYS.exec("find /tmp/dnsfilter -exec cat {} \\; 2>/dev/null | wc -l"))
o=s:option(DummyValue,"1",translate("Subscribe Rules Data"))
o.rawhtml=true
o.template="dnsfilter/refresh"
o.template="dnsfilter/dnsfilter_refresh"
o.value=rule_count.." "..translate("Records")
o.description=string.format(translate("AdGuardHome / Host / DNSMASQ / Domain rules auto-convert").."<br/><strong>"..translate("Last Update Checked")..":</strong> %s<br/>",UD)
end

View File

@ -4,9 +4,9 @@ XHR.poll(3,'<%=url([[admin]],[[services]],[[dnsfilter]],[[run]])%>',null,
var tb=document.getElementById('dnsfilter_status');
if (data&&tb){
if (data.running){
tb.innerHTML='<em><b><font color=green>DNSFilter <%:RUNNING%></font></b></em>';
tb.innerHTML='<em><b><font color=green>DNS Filter <%:RUNNING%></font></b></em>';
}else{
tb.innerHTML='<em><b><font color=red>DNSFilter <%:NOT RUNNING%></font></b></em>';
tb.innerHTML='<em><b><font color=red>DNS Filter <%:NOT RUNNING%></font></b></em>';
}
}
}

View File

@ -1,6 +1,9 @@
msgid "Base Setting"
msgstr "基本设置"
msgid "DNS Filter"
msgstr "DNS 过滤器"
msgid "Support AdGuardHome/Host/DNSMASQ/Domain Rules"
msgstr "支持 AdGuardHome/Host/DNSMASQ/Domain 规则"
@ -22,8 +25,8 @@ msgstr "拦截 短视频 APP 和网站"
msgid "Enable automatic update rules"
msgstr "启用规则自动更新"
msgid "Update time"
msgstr "更新时间"
msgid "Update time (every day)"
msgstr "更新时间 (每天)"
msgid "DNSFilter Data"
msgstr "DNSFilter 规则数据库"
@ -56,7 +59,7 @@ msgid "Subscribe Rules Data"
msgstr "去广告规则"
msgid "AdGuardHome / Host / DNSMASQ / Domain rules auto-convert"
msgstr "AdGuardHome / Host / DNSMASQ /Domain 规则自动识别, 自动去重"
msgstr "AdGuardHome / Host / DNSMASQ / Domain 规则自动识别, 自动去重"
msgid "Save rules to flash"
msgstr "保存规则到闪存"

View File

@ -4,7 +4,7 @@ PKG_NAME:=luci-app-serverchan
PKG_VERSION:=2.01.3
PKG_RELEASE:=9
PKG_MAINTAINER:=tty228
PKG_MAINTAINER:=tty228 <tty228@yeah.net>
LUCI_TITLE:=LuCI support for serverchan
LUCI_PKGARCH:=all

View File

@ -2,5 +2,5 @@ f = SimpleForm("serverchan")
luci.sys.call("/usr/bin/serverchan/serverchan client")
f.reset = false
f.submit = false
f:append(Template("serverchan/client"))
f:append(Template("serverchan/serverchan_client"))
return f

View File

@ -1,5 +1,5 @@
f = SimpleForm("serverchan")
f.reset = false
f.submit = false
f:append(Template("serverchan/log"))
f:append(Template("serverchan/serverchan_log"))
return f

View File

@ -503,7 +503,7 @@ function get_client(){
local js_str="${js_str}<div class='th'><%:${tmp_uptime}%></div></div>"
done < ${dir}ipAddress
fi
cat>/usr/lib/lua/luci/view/serverchan/client.htm<<EOF
cat>/usr/lib/lua/luci/view/serverchan/serverchan_client.htm<<EOF
<h2><%:在线设备列表%></h2><div class="table" id="traffic"><div class="tr table-titles"><div class="th" id="thClient" style="width:17%"><%:客户端名%></div><div class="th" id="thMAC" style="width:10%"><%:MAC%></div><div class="th" id="thIP" style="width:17%"><%:IP%></div><div class="th" id="thTotal" style="width:9%"><%:总计流量%></div><div class="th" id="thFirstSeen" style="width:15%"><%: 在线时间%></div></div>
$js_str
</div>
@ -718,7 +718,7 @@ function ip_changes(){
[ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 当前IPv6: ${IPv6}" >> ${logfile}
echo IPv4 $IPv4 > ${dir}ip && echo -e IPv6 $IPv6 >> ${dir}ip
title="路由器重新启动"
content="${content}${str_splitline}${str_title_start} 路由器重新启动"${str_title_end}
content="${content}${str_splitline}${str_title_start} 路由器重新启动${str_title_end}"
[ ! -z "$serverchan_ipv4" ] && [ "$serverchan_ipv4" -ne "0" ] && content="${content}${str_linefeed}${str_tab}当前IP${IPv4}"
[ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ] && content="${content}${str_linefeed}${str_tab}当前IPv6${IPv6}"
fi
@ -1104,7 +1104,7 @@ function send(){
local cpuload=`getcpu`
local ramload=`free -m|sed -n '2p'|awk '{printf "%.2f%%\n",($3/$2)*100}'`
local systemstatustime=`cat /proc/uptime|awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("运行时间:%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'`;unset run_days run_hour run_minute run_second
local send_content="${send_content}${str_splitline}${str_title_start} 系统运行状态"${str_title_end}
local send_content="${send_content}${str_splitline}${str_title_start} 系统运行状态${str_title_end}"
local send_content="${send_content}${str_linefeed}${str_tab}平均负载:${systemload}"
local send_content="${send_content}${str_linefeed}${str_tab}CPU占用${cpuload}"
local send_content="${send_content}${str_linefeed}${str_tab}内存占用:${ramload}"