From df0352da9dc0b1fbf6544c736a65e8730f56b60e Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Tue, 24 Mar 2020 05:11:00 +0800 Subject: [PATCH] luci-app-serverchan: bump to v1.48 --- package/ctcgfw/luci-app-serverchan/Makefile | 6 +++--- .../root/usr/bin/serverchan/serverchan | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/ctcgfw/luci-app-serverchan/Makefile b/package/ctcgfw/luci-app-serverchan/Makefile index 067e7f399f..4723542e44 100644 --- a/package/ctcgfw/luci-app-serverchan/Makefile +++ b/package/ctcgfw/luci-app-serverchan/Makefile @@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-serverchan -PKG_VERSION:=1.47 -PKG_RELEASE:=6 +PKG_VERSION:=1.48 +PKG_RELEASE:=7 include $(INCLUDE_DIR)/package.mk @@ -15,7 +15,7 @@ define Package/$(PKG_NAME) SECTION:=luci CATEGORY:=LuCI SUBMENU:=3. Applications - DEPENDS:=+iputils-arping +curl +iw + DEPENDS:=+iputils-arping +curl TITLE:=LuCI support for serverchan PKGARCH:=all endef diff --git a/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan b/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan index 235a755b8a..e578532955 100755 --- a/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan +++ b/package/ctcgfw/luci-app-serverchan/root/usr/bin/serverchan/serverchan @@ -323,8 +323,8 @@ function blackwhitelist(){ fi # 如果 “仅关注接口选项打开” elif [ ! -z "$serverchan_interface" ] ; then - local ip=`iw dev $serverchan_interface station dump | grep -i -w $1 | grep Station 2>/dev/null` - if [ ! -z "$ip" ];then local ip=`getinterface $1 | grep -i -w $serverchan_interface`;fi + local ip=`iw dev $serverchan_interface station dump | grep -i -w $1 | grep Station | grep -v "^$" 2>/dev/null` + if [ -z "$ip" ];then local ip=`getinterface $1 | grep -i -w $serverchan_interface | grep -v "^$"`;fi if [ ! -z "$ip" ];then echo 1 fi @@ -1086,7 +1086,7 @@ deltemp serverchan_cron # 限制并发进程 -thread_num=3 +thread_num=4 [ -e ${dir}fd1 ] || mkfifo ${dir}fd1 exec 5<>${dir}fd1 rm -f ${dir}fd1 >/dev/null 2>&1 @@ -1144,7 +1144,7 @@ do # 新设备接入检测 # 从 arp 缓存中读取 0x2 在线列表 if [ ! -f "${dir}ipAddress" ] ; then > ${dir}ipAddress;fi - IPLIST=$( cat /proc/net/arp | grep "0x2" | awk '{print $1}' | grep -v "^$" | sort -u ) && IPLISTrow=$(grep -c "" ${dir}ipAddress) + IPLIST=$( cat /proc/net/arp | grep "0x2\|0x6" | awk '{print $1}' | grep -v "^$" | sort -u ) && IPLISTrow=$(grep -c "" ${dir}ipAddress) send_enable=`get_config send_enable` for ip in $IPLIST; do # 如果 “ip 列表不为空”