From d2a6cbf10a40efe8c90ba4cd5c713af2e0d72500 Mon Sep 17 00:00:00 2001 From: Khachatryan Karen Date: Tue, 27 May 2025 21:38:09 +0300 Subject: [PATCH] antiblock: Update to 2.1.2r2 1) Added the ability to disable routes without deleting them. Signed-off-by: Khachatryan Karen --- net/antiblock/Makefile | 2 +- net/antiblock/files/etc/init.d/antiblock | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/net/antiblock/Makefile b/net/antiblock/Makefile index f380b0c545..6ac647a768 100644 --- a/net/antiblock/Makefile +++ b/net/antiblock/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=antiblock PKG_VERSION:=2.1.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/karen07/antiblock diff --git a/net/antiblock/files/etc/init.d/antiblock b/net/antiblock/files/etc/init.d/antiblock index 981e31b271..07a4d00368 100644 --- a/net/antiblock/files/etc/init.d/antiblock +++ b/net/antiblock/files/etc/init.d/antiblock @@ -10,13 +10,17 @@ blacklist_file="$tmp_folder/blacklist" routes_parse() { local _config="$1" - local _gateway - local _domains_path + local _enabled + config_get_bool _enabled "${_config}" "enabled" "1" + if [ "${_enabled}" -eq "1" ]; then + local _gateway + local _domains_path - config_get _gateway "${_config}" gateway - config_get _domains_path "${_config}" domains_path + config_get _gateway "${_config}" gateway + config_get _domains_path "${_config}" domains_path - procd_append_param command -r "${_gateway} ${_domains_path}" + procd_append_param command -r "${_gateway} ${_domains_path}" + fi } blacklist_parse() { -- 2.30.2