Skip to content

Commit

Permalink
🍕 Sync 2022-03-25 15:33:42
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 25, 2022
1 parent 76ee905 commit 175b704
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 83 deletions.
4 changes: 2 additions & 2 deletions UnblockNeteaseMusic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=UnblockNeteaseMusic
PKG_BASE_VERSION:=0.27.0-rc.4
PKG_RELEASE:=102
PKG_RELEASE:=103

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/UnblockNeteaseMusic/server.git
PKG_SOURCE_DATE:=2021-12-21
PKG_SOURCE_VERSION:=027e0df75eda788b7de9ddf1467040b635a3e3c8
PKG_SOURCE_VERSION:=55c53cf9e5ac176e8cd171b0ca0b3a0b50d614f6
PKG_MIRROR_HASH:=skip

PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if lock -n /var/lock/opkg-upgrade && opkg update; then
if [ "$(uci -q get wizard.default.autoupgrade_pkg)" != '0' ] && lock -n /var/lock/opkg-upgrade && opkg update; then
. /etc/profile.d/opkg.sh
opkg upgr 2>&1 | logger -t opkg
fi
Expand Down
6 changes: 3 additions & 3 deletions luci-app-serverchan/luasrc/model/cbi/serverchan/advanced.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ a.description = translate("请确认脚本可以正常运行,否则可能造
a=s:option(Flag,"err_sheep_enable",translate("仅在免打扰时段重拨"))
a.default=0
a.rmempty=true
a.description = translate("避免白天重拨 ddns 域名等待解析,此功能不影响断网检测<br/>因夜间跑流量问题,该功能可能不稳定")
a.description = translate("避免白天重拨 DDNS 域名等待解析,此功能不影响断网检测<br/>因夜间跑流量问题,该功能可能不稳定")
a:depends({err_enable="1"})

a= s:option(DynamicList, "err_device_aliases", translate("关注列表"))
Expand Down Expand Up @@ -109,11 +109,11 @@ a.datatype="uinteger"
a:depends({system_time_event="2"})
a.description = translate("单位为小时")

a=s:option(Flag,"public_ip_event",translate("重拨尝试获取公网 ip"))
a=s:option(Flag,"public_ip_event",translate("重拨尝试获取公网 IP"))
a.default=0
a.rmempty=true
a:depends({err_enable="1"})
a.description = translate("重拨时不会推送 ip 变动通知,并会导致你的域名无法及时更新 ip 地址<br/>请确认你可以通过重拨获取公网 ip,否则这不仅徒劳无功还会引起频繁断网<br/>移动等大内网你就别挣扎了!!")
a.description = translate("重拨时不会推送 IP 变动通知,并会导致你的域名无法及时更新 IP 地址<br/>请确认你可以通过重拨获取公网 IP,否则这不仅徒劳无功还会引起频繁断网<br/>移动等大内网你就别挣扎了!!")

a= s:option(Value, "public_ip_retry_count", "当天最大重试次数")
a.rmempty = true
Expand Down
12 changes: 6 additions & 6 deletions luci-app-serverchan/luasrc/model/cbi/serverchan/setting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local ifaces = sys.net:devices()
m=Map("serverchan",translate("ServerChan"),
translate("「Server酱」,英文名「ServerChan」,是一款从服务器推送报警信息和日志到微信的工具。<br /><br />如果你在使用中遇到问题,请到这里提交:")
.. [[<a href="https://github.com/tty228/luci-app-serverchan" target="_blank">]]
.. translate("github 项目地址")
.. translate("GitHub 项目地址")
.. [[</a>]]
)

Expand Down Expand Up @@ -132,7 +132,7 @@ a:value("",translate("关闭"))
a:value("1",translate("简化版"))
a:value("2",translate("完整版"))
a:value("3",translate("网络查询"))
a.description = translate("需下载 4.36m 原始数据,处理后完整版约 1.2M,简化版约 250kb <br/>若无梯子,请勿使用网络查询")
a.description = translate("需下载 4.36 MB 原始数据,处理后完整版约 1.2 MB,简化版约 250 kB <br/>若无梯子,请勿使用网络查询")

a=s:taboption("basic", Flag,"oui_dir",translate("下载到内存"))
a.rmempty = true
Expand All @@ -151,7 +151,7 @@ a.rmempty = true
a.description = translate("<br/> 请输入设备 MAC 和设备别名,用“-”隔开,如:<br/> XX:XX:XX:XX:XX:XX-我的手机")

--设备状态
a=s:taboption("content", ListValue,"serverchan_ipv4",translate("ipv4 变动通知"))
a=s:taboption("content", ListValue,"serverchan_ipv4",translate("IPv4 变动通知"))
a.rmempty = true
a.default=""
a:value("",translate("关闭"))
Expand All @@ -174,7 +174,7 @@ for _, iface in ipairs(ifaces) do
end
a.description = translate("<br/>一般选择 wan 接口,多拨环境请自行选择")

a=s:taboption("content", TextValue, "ipv4_list", translate("ipv4 api列表"))
a=s:taboption("content", TextValue, "ipv4_list", translate("IPv4 API列表"))
a.optional = false
a.rows = 8
a.wrap = "soft"
Expand All @@ -187,7 +187,7 @@ end
a.description = translate("<br/>会因服务器稳定性、连接频繁等原因导致获取失败<br/>如接口可以正常获取 IP,不推荐使用<br/>从以上列表中随机地址访问")
a:depends({serverchan_ipv4="2"})

a=s:taboption("content", ListValue,"serverchan_ipv6",translate("ipv6 变动通知"))
a=s:taboption("content", ListValue,"serverchan_ipv6",translate("IPv6 变动通知"))
a.rmempty = true
a.default="disable"
a:value("0",translate("关闭"))
Expand All @@ -210,7 +210,7 @@ for _, iface in ipairs(ifaces) do
end
a.description = translate("<br/>一般选择 wan 接口,多拨环境请自行选择")

a=s:taboption("content", TextValue, "ipv6_list", translate("ipv6 api列表"))
a=s:taboption("content", TextValue, "ipv6_list", translate("IPv6 API列表"))
a.optional = false
a.rows = 8
a.wrap = "soft"
Expand Down
2 changes: 1 addition & 1 deletion luci-app-serverchan/root/usr/bin/serverchan/api/ipv4.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
www.cip.cc
ifcfg.cn
speed.neu.edu.cn/getIP.php
ddns.oray.com/checkip
www.net.cn/static/customercare/yourip.asp
myip.ipip.net/s
52 changes: 26 additions & 26 deletions luci-app-serverchan/root/usr/bin/serverchan/serverchan
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function serverchan_init(){
[ ! -f "/usr/sbin/wrtbwmon" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】未安装 wrtbwmon ,流量统计不可用" >> ${logfile}
[ -z "$ip_version" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法获取依赖项 iputils-arping 版本号,请确认插件是否正常运行" >> ${logfile}
[ -z "$cu_version" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法获取依赖项 curl 版本号,请确认插件是否正常运行" >> ${logfile}
[ -z "${sckey}${tg_token}${pushplus_token}${corpid}${wxpusher_apptoken}${wxpusher_uids}${wxpusher_topicIds}" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】请填写正确的 key " >> ${logfile} && return 1
[ -z "${sckey}${tg_token}${pushplus_token}${corpid}${wxpusher_apptoken}${wxpusher_uids}${wxpusher_topicIds}" -a "${jsonpath}" != "/usr/bin/serverchan/api/diy.json" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】请填写正确的 key " >> ${logfile} && return 1
local interfacelist=`getinterfacelist` && [ -z "$interfacelist" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法正确获取接口信息,请确认插件是否正常运行" >> ${logfile}
return 0
}
Expand All @@ -81,12 +81,12 @@ function diy_send(){
local data=`/usr/bin/jq -r '.data' ${3}` && local data=`eval echo ${data}`
local content_type=`/usr/bin/jq -r '.content_type' ${3}`
/usr/bin/jq ".type + $type" ${jsonpath} > ${tempjsonpath}

/usr/bin/jq -r '.[]' ${tempjsonpath}|grep -w "null" && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】参数值错误,请检查设置项 `/usr/bin/jq -r '.' ${tempjsonpath}|grep "null"`" >> ${logfile} && return 1
[ -f ${tempjsonpath} ] && local logrow=$(grep -c "" ${tempjsonpath}) || local logrow="0"
[ $logrow -eq "0" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】json 文件生成失败,请检查文件格式" >> ${logfile} && return 1
/usr/bin/jq -r '.[]' ${tempjsonpath}|grep "null" && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】参数变量生成失败,请检查设置项 `/usr/bin/jq -r '.' ${tempjsonpath}|grep "null"`" >> ${logfile}

curl -X POST -H "$content_type" -d "${data}" "${diyurl}"
}

Expand All @@ -101,7 +101,7 @@ function down_oui(){
cat ${dir}oui.txt|grep "base 16"|grep -i "apple\|aruba\|asus\|autelan\|belkin\|bhu\|buffalo\|cctf\|cisco\|comba\|datang\|dell\|dlink\|dowell\|ericsson\|fast\|feixun\|\
fiberhome\|fujitsu\|grentech\|h3c\|hisense\|hiwifi\|honghai\|honghao\|hp\|htc\|huawei\|intel\|jinli\|jse\|lenovo\|lg\|liteon\|malata\|meizu\|mercury\|meru\|moto\|netcore\|\
netgear\|nokia\|omron\|oneplus\|oppo\|philips\|router_unkown\|samsung\|shanzhai\|sony\|start_net\|sunyuanda\|tcl\|tenda\|texas\|tianyu\|tp-link\|ubq\|undefine\|VMware\|\
utstarcom\|volans\|xerox\|xiaomi\|zdc\|zhongxing\|smartisan" > ${oui_base} && echo "`date "+%Y-%m-%d %H:%M:%S"` 【初始化】设备MAC厂商信息下载成功" >> ${logfile} || echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】设备MAC厂商信息下载失败" >> ${logfile}
utstarcom\|volans\|xerox\|xiaomi\|zdc\|zhongxing\|smartisan" > ${oui_base} && echo "`date "+%Y-%m-%d %H:%M:%S"` 【初始化】设备MAC厂商信息下载成功" >> ${logfile} || echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】设备MAC厂商信息下载失败" >> ${logfile}
fi
if [ -f ${dir}oui.txt ] && [ "$oui_data" -eq "2" ]; then
cat ${dir}oui.txt|grep "base 16" > ${oui_base} && echo "`date "+%Y-%m-%d %H:%M:%S"` 【初始化】设备MAC厂商信息下载成功" >> ${logfile} || echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】设备MAC厂商信息下载失败" >> ${logfile}
Expand Down Expand Up @@ -143,8 +143,8 @@ function getip(){
echo $hostIP|grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'|head -n1
}
local hostIP=`get_hostipv4`
[ -z "$hostIP" ] && local hostIP=`get_hostipv4`
[ -z "$hostIP" ] && local hostIP=`get_hostipv4`
[ -z "$hostIP" ] && sleep 1 && local hostIP=`get_hostipv4`
[ -z "$hostIP" ] && sleep 1 && local hostIP=`get_hostipv4`
echo $hostIP # 重试,偷懒,有空再优化
elif [ $1 == "wanipv6" ] ;then
[ ! -z "$ipv6_interface" ] && local wanIPv6=$(ip addr show ${ipv6_interface}|grep -v deprecated|grep -A1 'inet6 [^f:]'|sed -nr ':a;N;s#^ +inet6 ([a-f0-9:]+)/.+? scope global .*? valid_lft ([0-9]+sec) .*#\2 \1#p;ta'|sort -nr|head -n1|awk '{print $2}')
Expand All @@ -159,8 +159,8 @@ function getip(){
echo $hostIPv6|grep -oE '([\da-fA-F0-9]{1,4}(:{1,2})){1,15}[\da-fA-F0-9]{1,4}'|head -n1
}
local hostIPv6=`get_hostipv6`
[ -z "$hostIPv6" ] && local hostIPv6=`get_hostipv6`
[ -z "$hostIPv6" ] && local hostIPv6=`get_hostipv6`
[ -z "$hostIPv6" ] && sleep 1 && local hostIPv6=`get_hostipv6`
[ -z "$hostIPv6" ] && sleep 1 && local hostIPv6=`get_hostipv6`
echo $hostIPv6 # 重试,偷懒,有空再优化
fi
}
Expand All @@ -176,12 +176,12 @@ function getinterfaceuptime(){
getinterfacelist|grep \"uptime\"|sed $'s/\"uptime": //g'|sed $'s/\,//g'
}

# 查询 mac 地址
# 查询 MAC 地址
function getmac(){
( echo "$tmp_mac"|grep -q "unknown" ) && unset tmp_mac # 为unknown时重新读取
[ -f "${dir}ipAddress" ] && [ -z "$tmp_mac" ] && local tmp_mac=`cat ${dir}ipAddress|grep -w ${1}|awk '{print $2}'|grep -v "^$"|sort -u|head -n1`
[ -f "${dir}tmp_downlist" ] && [ -z "$tmp_mac" ] && local tmp_mac=`cat ${dir}tmp_downlist|grep -w ${1}|awk '{print $2}'|grep -v "^$"|sort -u|head -n1`
[ -f "/var/dhcp.leases" ] && [ -z "$tmp_mac" ] && local tmp_mac=`cat /var/dhcp.leases|grep -w ${1}|awk '{print $2}'|grep -v "^$"|sort -u|head -n1`
[ -f "/tmp/dhcp.leases" ] && [ -z "$tmp_mac" ] && local tmp_mac=`cat /tmp/dhcp.leases|grep -w ${1}|awk '{print $2}'|grep -v "^$"|sort -u|head -n1`
[ -z "$tmp_mac" ] && local tmp_mac=`cat /proc/net/arp|grep "0x2\|0x6"|grep -w ${1}|awk '{print $4}'|grep -v "^$"|sort -u|head -n1`
[ -z "$tmp_mac" ] && local tmp_mac="unknown"
echo "$tmp_mac"
Expand All @@ -193,7 +193,7 @@ function getname(){
[ -f "${dir}ipAddress" ] && [ -z "$tmp_name" ] && local tmp_name=`cat ${dir}ipAddress|grep -w ${1}|awk '{print $3}'|grep -v "^$"|sort -u|head -n1`
[ -f "${dir}tmp_downlist" ] && [ -z "$tmp_name" ] && local tmp_name=`cat ${dir}tmp_downlist|grep -w ${1}|awk '{print $3}'|grep -v "^$"|sort -u|head -n1`
( ! echo "$tmp_name"|grep -q -w "unknown\|*" ) && [ ! -z "$tmp_name" ] && echo "$tmp_name" && return || unset tmp_name # 为unknown时重新读取
[ -f "/var/dhcp.leases" ] && [ -z "$tmp_name" ] && local tmp_name=`cat /var/dhcp.leases|grep -w ${1}|awk '{print $4}'|grep -v "^$"|sort -u|head -n1`
[ -f "/tmp/dhcp.leases" ] && [ -z "$tmp_name" ] && local tmp_name=`cat /tmp/dhcp.leases|grep -w ${1}|awk '{print $4}'|grep -v "^$"|sort -u|head -n1`
( ! echo "$tmp_name"|grep -q -w "unknown\|*" ) && [ ! -z "$tmp_name" ] && echo "$tmp_name" && return || unset tmp_name # 为unknown时重新读取
[ -z "$dhcp_config" ] && dhcp_config=`uci show dhcp|grep "ip\|mac\|name"`
for dhcp_config_str in "host" "domain"; do
Expand Down Expand Up @@ -506,7 +506,7 @@ function get_client(){
done < ${dir}ipAddress
fi
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>
<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>
EOF
Expand Down Expand Up @@ -709,7 +709,7 @@ function ip_changes(){
echo IPv4 $IPv4 > ${dir}ip && echo -e IPv6 $IPv6 >> ${dir}ip
[ -z "$title" ] && title="IPv6 地址变化"
[ ! -z "$title" ] && title="IP 地址变化"
content="${content}${str_splitline}${str_title_start} IPv6 地址变化${str_title_end}${str_linefeed}${str_tab}当前 IPv6:${IPv6}"
content="${content}${str_splitline}${str_title_start} IPv6 地址变化${str_title_end}${str_linefeed}${str_tab}当前 IPv6:${IPv6}"
elif [ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ] && [ -z "$IPv6" ]; then
echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】获取 IPv6 地址失败" >> ${logfile}
fi
Expand All @@ -718,7 +718,7 @@ function ip_changes(){
echo "`date "+%Y-%m-%d %H:%M:%S"` ${disturb_text}路由器已经重启!" >> ${logfile}
[ ! -z "$serverchan_ipv4" ] && [ "$serverchan_ipv4" -ne "0" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 当前IP: ${IPv4}" >> ${logfile}
[ ! -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
echo IPv4 $IPv4 > ${dir}ip && echo -e IPv6 $IPv6 >> ${dir}ip
title="路由器重新启动"
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}"
Expand Down Expand Up @@ -967,7 +967,7 @@ function login_send(){
cat ${dir}login_monitor|grep -i "Bad password attempt\|Login attempt for nonexistent user from"|grep -Eo "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" >> ${dir}ssh_failed
echo "" > ${dir}login_monitor
add_ip_black

local login_ip_list=`cat ${dir}web_login|awk '{print $2}'|grep -v "^$"|sort -u|head -n1`
for login_ip in $login_ip_list; do
[ -z "$login_ip" ] && continue
Expand Down Expand Up @@ -1073,13 +1073,13 @@ function add_ip_black(){
[ ! -f "${ip_blacklist_path}" ] && local logrow="0"
[ ! -z "$web_login_black" ] && [ "$web_login_black" -eq "0" ] || [ -z "$web_login_black" ] && local logrow="0"
ipset flush ip_blacklist >/dev/null 2>&1

if [ $logrow -le "0" ]; then
iptables -D INPUT -m set --match-set ip_blacklist src -j DROP >/dev/null 2>&1
ipset destroy ip_blacklist >/dev/null 2>&1
return
fi

ipset list ip_blacklist >/dev/null 2>&1 || ipset create ip_blacklist hash:ip timeout ${ip_black_timeout} >/dev/null 2>&1
iptables -C INPUT -m set --match-set ip_blacklist src -j DROP >/dev/null 2>&1 || iptables -I INPUT -m set --match-set ip_blacklist src -j DROP >/dev/null 2>&1
echo "$1" >> ${ip_blacklist_path}
Expand Down Expand Up @@ -1128,14 +1128,14 @@ function send(){

if [ -z "$1" ] && [ ! -z "$router_wan" ] && [ "$router_wan" -eq "1" ]; then
local send_wanIP=`getip wanipv4`;local send_hostIP=`getip hostipv4`
local send_content="${send_content}${str_splitline}${str_title_start} WAN 口信息${str_title_end}${str_linefeed}${str_tab}接口ip:${send_wanIP}"
local send_content="${send_content}${str_linefeed}${str_tab}外网ip:${send_hostIP}"
local send_content="${send_content}${str_splitline}${str_title_start} WAN 口信息${str_title_end}${str_linefeed}${str_tab}接口 IPv4:${send_wanIP}"
local send_content="${send_content}${str_linefeed}${str_tab}外网 IPv4:${send_hostIP}"
if [ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ]; then
local send_wanIPv6=`getip wanipv6`;local send_hostIPv6=`getip hostipv6`
local send_content="${send_content}${str_linefeed}${str_tab}ipv6 :${send_wanIPv6}"
local send_content="${send_content}${str_linefeed}${str_tab}外网v6:${send_hostIPv6}"
local send_content="${send_content}${str_linefeed}${str_tab}接口 IPv6:${send_wanIPv6}"
local send_content="${send_content}${str_linefeed}${str_tab}外网 IPv6:${send_hostIPv6}"
fi
( ! echo "$send_wanIP"|grep -q -w ${send_hostIP} ) && local send_content="${send_content}${str_linefeed}${str_tab}外网 ip 与接口 ip 不一致,你的 ip 不是公网 ip"
( ! echo "$send_wanIP"|grep -q -w ${send_hostIP} ) && local send_content="${send_content}${str_linefeed}${str_tab}外网 IP 与接口 IP 不一致,你的 IP 可能不是公网 IP"
local interfaceuptime=`getinterfaceuptime`
[ ! -z "$interfaceuptime" ] && local wanstatustime=`getinterfaceuptime|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_linefeed}${str_tab}${wanstatustime}"
Expand Down Expand Up @@ -1200,7 +1200,7 @@ while [ "$serverchan_enable" -eq "1" ]; do
deltemp
usage update
serverchan_disturb;disturb=$?

[ -f ${dir}ipAddress ] && ipAddress_logrow=$(grep -c "" ${dir}ipAddress) || ipAddress_logrow="0";
if [ $ipAddress_logrow -ne "0" ]; then
online_list=`cat ${dir}ipAddress|awk '{print $2}'|grep -v "^$"|sort -u`
Expand Down Expand Up @@ -1237,17 +1237,17 @@ while [ "$serverchan_enable" -eq "1" ]; do

# 异常流量检测
[ ! -f "${dir}send_enable.lock" ] && get_client_usage

# 登陆提醒通知
[ ! -f "${dir}send_enable.lock" ] && login_send
[ ! -f "${dir}send_enable.lock" ] && login_send

if [ ! -f "${dir}send_enable.lock" ] && [ ! -z "$title" ] && [ ! -z "$content" ]; then
[ ! -z "$device_name" ] && title="$device_name$title"
( echo "$lite_enable"|grep -q "content" ) && content="$title"
[ "$disturb" -eq "0" ] && diy_send "${title}" "${content}" "${jsonpath}" >/dev/null 2>&1
[ $? -eq 1 ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】推送失败,请检查网络或设置信息 " >> ${logfile}
fi

while [ -f "${dir}send_enable.lock" ]; do
sleep $sleeptime
done
Expand Down
7 changes: 4 additions & 3 deletions luci-app-socatg/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-socatg
PKG_VERSION=1.2

PKG_LICENSE:=MIT
PKG_MAINTAINER:=drophair <https://github.com/big-tooth>

LUCI_TITLE:=LuCI Support for socatg
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+socat
# PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/luci/luci.mk

# call BuildPackage - OpenWrt buildroot signature
18 changes: 0 additions & 18 deletions luci-app-socatg/README-Chinese.md

This file was deleted.

Loading

0 comments on commit 175b704

Please sign in to comment.