update-02.15

This commit is contained in:
github-actions[bot] 2022-02-15 20:30:43 +08:00
parent 07524759ab
commit 0d010655f2
11 changed files with 116 additions and 30 deletions

View File

@ -22,7 +22,7 @@ set opkg.defaults.proc='--force-overwrite --force-checksum --force-depends'
set opkg.defaults.reinstall='--force-reinstall --force-overwrite --force-checksum --force-depends'
set opkg.defaults.newconf='/etc'
EOI
echo "kmod busybox base-files luci-app-openclash opkg " \
echo "kmod busybox base-files luci-app-openclash " \
| sed -e "s/\s/ ipkg\n/g" | opkg uci ignore
}

View File

@ -24,21 +24,22 @@ plugin:
exec:
- if:
- query_is_ad_domain
- qtype65
exec:
- _block_with_nxdomain
- _end
- _return
- if:
- query_is_whitelist_domain
- query_is_local_domain
- '!_query_is_common'
exec:
- forward_local
- _end
- _return
- if:
- query_is_non_local_domain
exec:
- forward_remote
- _end
- _return
- primary:
- forward_local
- if:
@ -68,9 +69,7 @@ plugin:
args:
upstream:
- addr: 'tls://8.8.4.4'
idle_timeout: 10
- addr: 'tls://9.9.9.9'
idle_timeout: 10
- tag: lazy_cache
type: cache
@ -101,3 +100,8 @@ plugin:
args:
domain:
- 'ext:./serverlist.txt'
- tag: qtype65
type: query_matcher
args:
qtype: [65]

View File

@ -27,7 +27,7 @@
- 因微信推送存在诸多弊端(无法分开聊天工具与功能性消息推送,通知内不显示内容,内容需要点开才能查看等),
- 故由 然后七年 @zzsj0928 重新修改为本插件为钉钉机器人API使用。
- 本插件工作在openwrt
- 本插件支持:钉钉推送,企业微信推送,PushPlus推送,微信推送,企业微信应用推送,飞书推送,钉钉机器人推送,企业微信机器人推送,飞书机器人推送,一对多推送,Bark推送(仅iOS)
- 本插件支持:钉钉推送,企业微信推送,PushPlus推送,微信推送,企业微信应用推送,飞书推送,钉钉机器人推送,企业微信机器人推送,飞书机器人推送,一对多推送,Bark推送(仅iOS),PushDeer,PushDeer自架
- 自20210911之后的版本支持Bark群组群组名默认为设备名
- 自20210901之后的版本增加依赖jq请重新编译或在安装前同步安装jq

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for quickstart
LUCI_DEPENDS:=+quickstart +shadow-useradd +luci-app-store
LUCI_PKGARCH:=all
PKG_VERSION:=0.2.0
PKG_VERSION:=0.2.1
PKG_RELEASE:=1
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -5,9 +5,14 @@ module("luci.controller.quickstart", package.seeall)
local page_index = {"admin", "quickstart", "pages"}
function index()
entry({"admin", "quickstart"}, call("redirect_index"), _("QuickStart"), 1)
entry({"admin", "network_guide"}, call("networkguide_index"), _("NetworkGuide"), 2)
entry({"admin", "quickstart", "pages"}, call("quickstart_index")).leaf = true
if luci.sys.call("pgrep quickstart >/dev/null") == 0 then
entry({"admin", "quickstart"}, call("redirect_index"), _("QuickStart"), 1)
entry({"admin", "network_guide"}, call("networkguide_index"), _("NetworkGuide"), 2)
entry({"admin", "quickstart", "pages"}, call("quickstart_index")).leaf = true
else
entry({"admin", "quickstart"})
entry({"admin", "quickstart", "pages"}, call("redirect_fallback")).leaf = true
end
end
function networkguide_index()
@ -18,6 +23,10 @@ function redirect_index()
luci.http.redirect(luci.dispatcher.build_url(unpack(page_index)))
end
function redirect_fallback()
luci.http.redirect(luci.dispatcher.build_url("admin","status"))
end
function quickstart_index()
luci.template.render("quickstart/main", {prefix=luci.dispatcher.build_url(unpack(page_index))})
end

View File

@ -28,10 +28,11 @@ start()
d=$(echo -n ' Core ')
e=$(cat /proc/cpuinfo | grep 'processor' | wc -l)
f=$(echo -n ' Thread ')
g=${b}${c}${d}${e}${f}
g=$(dmesg | grep 'DMI:' | awk -F ',' '{print $1$2 }' | awk -F ':' '{print $2 }')
h=${g}' '${b}${c}${d}${e}${f}
mkdir -p /tmp/sysinfo
sed -i "s/\(.\+\)/\1$g /" /tmp/sysinfo/model
echo $h > /tmp/sysinfo/model
a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -v "@" | grep -v "\.")
b=$(echo "$a" | wc -l)
@ -47,4 +48,6 @@ start()
ethtool -K $c tso on >/dev/null 2>&1
ethtool -K $c ufo on >/dev/null 2>&1
done
[ -f /etc/index.htm ] && mv /etc/index.htm /usr/lib/lua/luci/view/admin_status/index.htm
}

View File

@ -6,10 +6,11 @@
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=my-default-settings
PKG_VERSION:=1
PKG_RELEASE:=10
PKG_RELEASE:=40
include $(INCLUDE_DIR)/package.mk
@ -27,7 +28,7 @@ define Package/$(PKG_NAME)/conffiles
endef
define Build/Prepare
chmod +x ./files/bin/* ./files/sbin/* ./files/etc/profile.d/* ./files/usr/share/* >/dev/null || true
chmod +x ./files/bin/* ./files/sbin/* ./files/etc/profile.d/* ./files/usr/share/* target/*/{*,}/files/{etc/init.d/*,usr/bin/*} >/dev/null || true
endef
define Build/Compile
@ -35,10 +36,16 @@ endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
echo $(BOARD)$(TARGETID)
if [ -d ./target/$(BOARD)/files/. ]; then \
$(CP) ./target/$(BOARD)/files/* $(1)/; \
fi
if [ -d ./target/$(TARGETID)/files/. ]; then \
$(CP) ./target/$(TARGETID)/files/* $(1)/; \
fi; \
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
po2lmo ./po/zh_Hans/default.po $(1)/usr/lib/lua/luci/i18n/default.zh-cn.lmo
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -1,11 +0,0 @@
_____
_____________________________ __________ /_
_ __ \__ __ \ _ \_ __ \_ | /| / /_ ___/ __/
/ /_/ /_ /_/ / __/ / / /_ |/ |/ /_ / / /_
\____/_ .___/\___//_/ /_/____/|__/ /_/ \__/
/_/
_________________________________________
%D %C by Kiddin'
_________________________________________

View File

@ -226,8 +226,6 @@ uci commit base_config
[[ -f "/bin/coremark" && ! -f "/etc/bench.log" && "$(uci -q get wizard.default.coremark)" == '1' ]] && {
sleep 30
/bin/coremark >/tmp/coremark.log
cat /tmp/coremark.log | grep "CoreMark 1.0" | cut -d "/" -f 1 | cut -d "." -f -2 >/etc/bench.log
sed -i 's/CoreMark 1.0/(CpuMark/g' /etc/bench.log
echo " Scores)" >>/etc/bench.log
cat /tmp/coremark.log | grep "CoreMark 1.0" | cut -d "/" -f 1 | cut -d "." -f -2 | sed -e 's/CoreMark 1.0\(.*\)/(CpuMark\1 Scores)/g' >/etc/bench.log
}
) &

View File

@ -0,0 +1,7 @@
#!/bin/sh /etc/rc.common
START=21
start() {
/usr/bin/fa-fancontrol.sh &
}

View File

@ -0,0 +1,69 @@
#!/bin/bash
# determine fan controller
if [ -d /sys/devices/platform/pwm-fan ]; then
echo "pls use /usr/bin/fa-fancontrol.sh."
exit 1
fi
if [ ! -d /sys/class/pwm/pwmchip0 ]; then
echo "this model does not support pwm."
exit 1
fi
if [ ! -d /sys/class/pwm/pwmchip0/pwm0 ]; then
echo 0 > /sys/class/pwm/pwmchip0/export
fi
sleep 1
while [ ! -d /sys/class/pwm/pwmchip0/pwm0 ];
do
sleep 1
done
ISENABLE=`cat /sys/class/pwm/pwmchip0/pwm0/enable`
if [ $ISENABLE -eq 1 ]; then
echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable
fi
echo 50000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
# max speed run 5s
echo 46990 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
sleep 5
echo 25000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
# declare -a CpuTemps=(55000 43000 38000 32000)
# declare -a PwmDutyCycles=(1000 20000 30000 45000)
declare -a CpuTemps=(75000 63000 58000 52000)
declare -a PwmDutyCycles=(25000 35000 45000 46990)
declare -a Percents=(100 75 50 25)
DefaultDuty=49990
DefaultPercents=0
while true
do
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
INDEX=0
FOUNDTEMP=0
DUTY=$DefaultDuty
PERCENT=$DefaultPercents
for i in 0 1 2 3; do
if [ $temp -gt ${CpuTemps[$i]} ]; then
INDEX=$i
FOUNDTEMP=1
break
fi
done
if [ ${FOUNDTEMP} == 1 ]; then
DUTY=${PwmDutyCycles[$i]}
PERCENT=${Percents[$i]}
fi
echo $DUTY > /sys/class/pwm/pwmchip0/pwm0/duty_cycle;
# echo "temp: $temp, duty: $DUTY, ${PERCENT}%"
# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
sleep 2s;
done