From c345d4bae7bcc5c28310c39b7bf453f2d7fe21d7 Mon Sep 17 00:00:00 2001 From: CN_SZTL <22235437+1715173329@users.noreply.github.com> Date: Tue, 24 Mar 2020 22:50:13 +0800 Subject: [PATCH 1/3] luci-app-nft-qos: correct path to luci.mk (#3997) --- package/lean/luci-app-nft-qos/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/lean/luci-app-nft-qos/Makefile b/package/lean/luci-app-nft-qos/Makefile index 01de879937..8349e775f6 100644 --- a/package/lean/luci-app-nft-qos/Makefile +++ b/package/lean/luci-app-nft-qos/Makefile @@ -9,6 +9,6 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Qos over Nftables LUCI_DEPENDS:=+nft-qos -include ../../luci.mk +include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature From 5c5f32c08273a7ab7863c0636cb56cb0dc62f844 Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 25 Mar 2020 01:38:14 +0800 Subject: [PATCH 2/3] luci-app-ssr-plus: fix socks5 global server auto-start --- package/lean/luci-app-ssr-plus/Makefile | 2 +- package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 3c411d4ced..1d30ecf41f 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=174 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index fe57f9a2aa..665fe34101 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -577,7 +577,7 @@ start_server() { } start_local() { - local local_server=$(uci_get_by_type socks5_proxy server) + local local_server=$(uci_get_by_type socks5_proxy server nil) [ "$local_server" = "nil" ] && return 1 local local_type=$(uci_get_by_name $local_server type) mkdir -p /var/run /var/etc From a59b400913332d60251fcedaf2f2fcd7e50fcb38 Mon Sep 17 00:00:00 2001 From: lean Date: Wed, 25 Mar 2020 01:44:35 +0800 Subject: [PATCH 3/3] autocore:getcpu method change --- package/lean/autocore/Makefile | 2 +- package/lean/autocore/files/sbin/getcpu | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index 5a3ea11321..207bfced80 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=29 +PKG_RELEASE:=30 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/autocore/files/sbin/getcpu b/package/lean/autocore/files/sbin/getcpu index 4541477022..61e8d6ee43 100755 --- a/package/lean/autocore/files/sbin/getcpu +++ b/package/lean/autocore/files/sbin/getcpu @@ -1,7 +1,8 @@ #!/bin/sh -AT=$(cat /proc/stat | grep "^cpu " | awk '{print $2+$3+$4+$5+$6+$7+$8 " " $2+$3+$4+$7+$8}') -sleep 3 -BT=$(cat /proc/stat | grep "^cpu " | awk '{print $2+$3+$4+$5+$6+$7+$8 " " $2+$3+$4+$7+$8}') - -printf "%.01f%%" $(echo $AT $BT | awk '{print (($4-$2)/($3-$1))*100}') >/tmp/cpuusage \ No newline at end of file +if [ $(busybox ps -w | grep getcpu | grep -v grep | wc -l) -le 2 ]; then + AT=$(cat /proc/stat | grep "^cpu " | awk '{print $2+$3+$4+$5+$6+$7+$8 " " $2+$3+$4+$7+$8}') + sleep 1 + BT=$(cat /proc/stat | grep "^cpu " | awk '{print $2+$3+$4+$5+$6+$7+$8 " " $2+$3+$4+$7+$8}') + printf "%.01f%%" $(echo $AT $BT | awk '{print (($4-$2)/($3-$1))*100}') >/tmp/cpuusage +fi \ No newline at end of file