mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
antiblock: Update to 2.1.1
1) Fixed a bug that not all routers were deleted. 2) Log updated. 3) The "output" option has been removed from the service, it is now /tmp/antiblock Signed-off-by: Khachatryan Karen <karen0734@gmail.com>
This commit is contained in:
committed by
Hannu Nyman
parent
08084d48a4
commit
47425ce255
@@ -1,13 +1,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=antiblock
|
PKG_NAME:=antiblock
|
||||||
PKG_VERSION:=2.1.0
|
PKG_VERSION:=2.1.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/karen07/antiblock
|
PKG_SOURCE_URL:=https://github.com/karen07/antiblock
|
||||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||||
PKG_MIRROR_HASH:=898e06eb32a6617e731a1777845c7d59f70fff24ab7a931209fc1065eb119fbd
|
PKG_MIRROR_HASH:=61183b8c4710896dde95fc4ca065a31224161bfc98c6040ca93950ef190afc53
|
||||||
|
|
||||||
PKG_MAINTAINER:=Khachatryan Karen <karen0734@gmail.com>
|
PKG_MAINTAINER:=Khachatryan Karen <karen0734@gmail.com>
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#Optional parameters:
|
#Optional parameters:
|
||||||
#option log '1'
|
#option log '1'
|
||||||
#option stat '1'
|
#option stat '1'
|
||||||
#option output '/test/'
|
|
||||||
#list blacklist 'x.x.x.x/xx'
|
#list blacklist 'x.x.x.x/xx'
|
||||||
#list blacklist 'x.x.x.x/xx'
|
#list blacklist 'x.x.x.x/xx'
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ USE_PROCD=1
|
|||||||
START=99
|
START=99
|
||||||
|
|
||||||
prog_name="antiblock"
|
prog_name="antiblock"
|
||||||
blacklist_folder="/tmp/$prog_name"
|
tmp_folder="/tmp/$prog_name"
|
||||||
blacklist_file="$blacklist_folder/blacklist"
|
blacklist_file="$tmp_folder/blacklist"
|
||||||
|
|
||||||
routes_parse() {
|
routes_parse() {
|
||||||
local _config="$1"
|
local _config="$1"
|
||||||
@@ -20,7 +20,7 @@ routes_parse() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blacklist_parse() {
|
blacklist_parse() {
|
||||||
[ "${_blacklist_count}" -eq "0" ] && mkdir -p $blacklist_folder && >$blacklist_file
|
[ "${_blacklist_count}" -eq "0" ] && mkdir -p $tmp_folder && >$blacklist_file
|
||||||
_blacklist_count=$(expr "${_blacklist_count}" + 1)
|
_blacklist_count=$(expr "${_blacklist_count}" + 1)
|
||||||
echo "$1" >>$blacklist_file
|
echo "$1" >>$blacklist_file
|
||||||
}
|
}
|
||||||
@@ -34,12 +34,10 @@ start_service() {
|
|||||||
|
|
||||||
echo "AntiBlock start"
|
echo "AntiBlock start"
|
||||||
|
|
||||||
local _output
|
|
||||||
local _log
|
local _log
|
||||||
local _stat
|
local _stat
|
||||||
local _test
|
local _test
|
||||||
|
|
||||||
config_get _output "config" "output"
|
|
||||||
config_get_bool _log "config" "log" "0"
|
config_get_bool _log "config" "log" "0"
|
||||||
config_get_bool _stat "config" "stat" "0"
|
config_get_bool _stat "config" "stat" "0"
|
||||||
config_get_bool _test "config" "test" "0"
|
config_get_bool _test "config" "test" "0"
|
||||||
@@ -59,10 +57,10 @@ start_service() {
|
|||||||
_listen="$(uci -q get network.lan.ipaddr):53"
|
_listen="$(uci -q get network.lan.ipaddr):53"
|
||||||
procd_append_param command -l "${_listen}"
|
procd_append_param command -l "${_listen}"
|
||||||
|
|
||||||
[ -n "${_output}" ] && mkdir -p "${_output}" && procd_append_param command -o "${_output}"
|
procd_append_param command -o "$tmp_folder"
|
||||||
[ "${_blacklist_count}" -ne "0" ] && procd_append_param command -b "$blacklist_file"
|
[ "${_blacklist_count}" -ne "0" ] && procd_append_param command -b "$blacklist_file"
|
||||||
[ "${_log}" -ne "0" ] && procd_append_param command --log
|
[ "${_log}" -ne "0" ] && mkdir -p $tmp_folder && procd_append_param command --log
|
||||||
[ "${_stat}" -ne "0" ] && procd_append_param command --stat
|
[ "${_stat}" -ne "0" ] && mkdir -p $tmp_folder && procd_append_param command --stat
|
||||||
[ "${_test}" -ne "0" ] && procd_append_param command --test
|
[ "${_test}" -ne "0" ] && procd_append_param command --test
|
||||||
|
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
|
|||||||
Reference in New Issue
Block a user