diff --git a/brook/Makefile b/brook/Makefile index e5169193e..8c3cafac3 100644 --- a/brook/Makefile +++ b/brook/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=brook -PKG_VERSION:=20230101 +PKG_VERSION:=20230122 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/txthinking/brook/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=d131b408102ef6865c64a7cf9d7417308ef3109c79dc627e01bfd665cf80e47c +PKG_HASH:=52643df51144b4b1afbacb51156f92ba61adbcff77dd8f76e3278ce70644f237 PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=GPL-3.0 diff --git a/luci-app-autotimeset/Makefile b/luci-app-autotimeset/Makefile index 4f09a61b0..b88bb53ee 100644 --- a/luci-app-autotimeset/Makefile +++ b/luci-app-autotimeset/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Scheduled Time setting LUCI_PKGARCH:=all -PKG_VERSION:=1.6 -PKG_RELEASE:=20230115 +PKG_VERSION:=1.7 +PKG_RELEASE:=20230120 define Package/$(PKG_NAME)/conffiles /etc/config/autotimeset diff --git a/luci-app-autotimeset/luasrc/model/cbi/autotimeset.lua b/luci-app-autotimeset/luasrc/model/cbi/autotimeset.lua index 9218aee3f..96e72dc9d 100644 --- a/luci-app-autotimeset/luasrc/model/cbi/autotimeset.lua +++ b/luci-app-autotimeset/luasrc/model/cbi/autotimeset.lua @@ -20,6 +20,7 @@ e:value(5,translate("Scheduled Restartwan")) e:value(6,translate("Scheduled Closewan")) e:value(7,translate("Scheduled Clearmem")) e:value(8,translate("Scheduled Sysfree")) +e:value(9,translate("Scheduled DisReconn")) e.default=2 week=s:option(ListValue,"week",translate("Week Day")) diff --git a/luci-app-autotimeset/po/zh-cn/autotimeset.po b/luci-app-autotimeset/po/zh-cn/autotimeset.po index c74075ea5..5d14879b8 100644 --- a/luci-app-autotimeset/po/zh-cn/autotimeset.po +++ b/luci-app-autotimeset/po/zh-cn/autotimeset.po @@ -31,6 +31,9 @@ msgstr "定时释放内存" msgid "Scheduled Sysfree" msgstr "定时系统清理" +msgid "Scheduled DisReconn" +msgstr "检测断线重连" + msgid "Week Day" msgstr "设定星期" diff --git a/luci-app-autotimeset/root/etc/init.d/autotimeset b/luci-app-autotimeset/root/etc/init.d/autotimeset index 38b90b28d..8ed5ae59a 100644 --- a/luci-app-autotimeset/root/etc/init.d/autotimeset +++ b/luci-app-autotimeset/root/etc/init.d/autotimeset @@ -49,6 +49,10 @@ do local cmd="$minute $hour * * $week /usr/bin/timesethandler sysfree" echo "$cmd" >> /etc/crontabs/root ;; + 9) + local cmd="$minute $hour * * $week /usr/bin/timesethandler disreconn" + echo "$cmd" >> /etc/crontabs/root + ;; esac fi diff --git a/luci-app-autotimeset/root/usr/bin/timesethandler b/luci-app-autotimeset/root/usr/bin/timesethandler index a459dbf5b..765794560 100644 --- a/luci-app-autotimeset/root/usr/bin/timesethandler +++ b/luci-app-autotimeset/root/usr/bin/timesethandler @@ -1,6 +1,30 @@ #!/bin/sh # author 2021 jjm2473 -# author 2020-2023 sirpdboy +# author 2020-2023 sirpdboy + +disreconnwan() { +i=0 +PingA=114.114.114.114 +PingB=223.5.5.5 +while [[ $i -lt 5 ]] +do + if /bin/ping -c 1 $PingA >/dev/null + then + PingErr=0 + break + else + if /bin/ping -c 1 $PingB >/dev/null + then + PingErr=0 + break + else + i=$(($i + 1)) + PingErr=1 + sleep 10 + fi + fi +done +} trigger() { case "$1" in @@ -39,15 +63,22 @@ trigger() { /etc/init.d/samba4 restart ;; restartwan) - ifdown wan + # ifdown wan ifup wan ;; closewan) ifdown wan ;; + disreconn) + disreconnwan + if [ $PingErr = 1 ]; then + ifup wan + fi + ;; esac } +PingErr=0 logger -p warn -t "autotimeset" "Automatic timing operation execution operation:$@, execution time: `date `" && trigger $@ diff --git a/sub-web/Makefile b/sub-web/Makefile index bb3e8a6d1..eebeb2f06 100644 --- a/sub-web/Makefile +++ b/sub-web/Makefile @@ -35,7 +35,7 @@ define Build/Compile ( \ pushd "$(PKG_BUILD_DIR)"; \ yarn install; \ - NODE_OPTIONS=--openssl-legacy-provider yarn build; \ + yarn build; \ popd ; \ ) endef