From 53bc8167fa2834a0f657f8f71a657461a0e77212 Mon Sep 17 00:00:00 2001 From: gSpot Date: Wed, 7 Jan 2026 22:38:48 +0300 Subject: [PATCH] Minor fixes. --- autoinstall/2.x/apk/autoinstall.sh | 2 +- autoinstall/2.x/autoinstall.sh | 2 +- ruantiblock/Makefile | 2 +- ruantiblock/files/usr/bin/ruantiblock | 58 ++++++++++++++------------- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/autoinstall/2.x/apk/autoinstall.sh b/autoinstall/2.x/apk/autoinstall.sh index 36571a3..54066c5 100755 --- a/autoinstall/2.x/apk/autoinstall.sh +++ b/autoinstall/2.x/apk/autoinstall.sh @@ -10,7 +10,7 @@ LUCI_APP=1 HTTPS_DNS_PROXY=1 OWRT_VERSION="25.12" -RUAB_VERSION="2.1.11-r1" +RUAB_VERSION="2.1.11-r2" RUAB_MOD_LUA_VERSION="2.1.11-r1" RUAB_LUCI_APP_VERSION="2.1.11-r1" BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master" diff --git a/autoinstall/2.x/autoinstall.sh b/autoinstall/2.x/autoinstall.sh index 8141a41..4e2e98a 100755 --- a/autoinstall/2.x/autoinstall.sh +++ b/autoinstall/2.x/autoinstall.sh @@ -10,7 +10,7 @@ LUCI_APP=1 HTTPS_DNS_PROXY=1 OWRT_VERSION="24.10" -RUAB_VERSION="2.1.11-r1" +RUAB_VERSION="2.1.11-r2" RUAB_MOD_LUA_VERSION="2.1.11-r1" RUAB_LUCI_APP_VERSION="2.1.11-r1" BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master" diff --git a/ruantiblock/Makefile b/ruantiblock/Makefile index eec4569..5156d7a 100644 --- a/ruantiblock/Makefile +++ b/ruantiblock/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruantiblock PKG_VERSION:=2.1.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=gSpot include $(INCLUDE_DIR)/package.mk diff --git a/ruantiblock/files/usr/bin/ruantiblock b/ruantiblock/files/usr/bin/ruantiblock index 0f112d5..d3d6ab6 100755 --- a/ruantiblock/files/usr/bin/ruantiblock +++ b/ruantiblock/files/usr/bin/ruantiblock @@ -1040,12 +1040,6 @@ CheckDnsmasqConfDir() { Update() { local _arg="$1" _return_code=0 - if CheckStatus; then - : - else - echo " ${NAME} ${_arg} - Error! ${NAME} does not running or another error has occurred" >&2 - return 1 - fi MakeToken if [ -e "$U_PID_FILE" ] && [ "$_arg" != "force-update" ]; then echo " ${NAME} ${_arg} - Error! Another instance of update is already running" >&2 @@ -1129,32 +1123,36 @@ Stop() { Reload() { local _i=0 _attempts=60 - MakeToken - while [ -e "$START_PID_FILE" ] - do - if [ $_i -ge $_attempts ]; then - return 1 - fi - _i=$(($_i + 1)) + if CheckStatus; then + MakeToken + while [ -e "$START_PID_FILE" ] + do + if [ $_i -ge $_attempts ]; then + return 1 + fi + _i=$(($_i + 1)) + + if [ $DEBUG -ge 1 ]; then + echo " ruantiblock.Reload._i=${_i}" >&2 + MakeLogRecord "debug" "ruantiblock.Reload._i ${_i}" + fi + + sleep 1 + done if [ $DEBUG -ge 1 ]; then - echo " ruantiblock.Reload._i=${_i}" >&2 - MakeLogRecord "debug" "ruantiblock.Reload._i ${_i}" + echo " ruantiblock.Reload()" >&2 + MakeLogRecord "debug" "ruantiblock.Reload()" fi - sleep 1 - done - - if [ $DEBUG -ge 1 ]; then - echo " ruantiblock.Reload()" >&2 - MakeLogRecord "debug" "ruantiblock.Reload()" + echo " ${NAME} reload..." + DeleteNftRules &> /dev/null + AddNftRules &> /dev/null + UpdateLocalIpSets + MakeToken + else + echo " ${NAME} does not running" >&2 fi - - echo " ${NAME} reload..." - DeleteNftRules &> /dev/null - AddNftRules &> /dev/null - UpdateLocalIpSets - MakeToken } Status() { @@ -1274,6 +1272,12 @@ case "$1" in ;; update|force-update) Init + if CheckStatus; then + : + else + echo " ${NAME} ${_arg} - Error! ${NAME} does not running or another error has occurred" >&2 + return 1 + fi UpdateLocalIpSets if CheckDnsmasqConfDir; then Update "$1"