adblock: update 4.1.5-2
authorDirk Brenken <dev@brenken.org>
Thu, 20 Oct 2022 09:46:09 +0000 (11:46 +0200)
committerDirk Brenken <dev@brenken.org>
Thu, 20 Oct 2022 09:46:47 +0000 (11:46 +0200)
* fixed broken/blocked oisd download links (switched to the official github mirror)
* made sure that curl error out on http errors as well
* removed obsolete compatibility stuff from init script

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/adblock/Makefile
net/adblock/files/adblock.init
net/adblock/files/adblock.sh
net/adblock/files/adblock.sources

index efd049546f60d9e5c0aefb532a962eaf16dfcd2f..e6feeee82fd6acd8e5a6d885793b4acbb0320630 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.1.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index a7ed06422698409898456f04198dc9a158302933..732c8a6101fd19f30e7a29b8dcd9984b6cc79b2e 100755 (executable)
@@ -8,23 +8,12 @@
 START=30
 USE_PROCD=1
 
-if [ -n "$(type -t extra_command)" ]; then
-       extra_command "suspend" "Suspend adblock processing"
-       extra_command "resume" "Resume adblock processing"
-       extra_command "query" "<domain> Query active blocklists and backups for a specific domain"
-       extra_command "report" "[[<cli>|<mail>|<gen>|<json>] [<top_count>] [<res_count>] [<search>]] Print DNS statistics with an optional search parameter"
-       extra_command "list" "[<add>|<add_sha>|<add_utc>|<add_eng>|<add_stb>|<remove>|<remove_sha>|<remove_utc>|<remove_eng>|<remove_stb>] <source(s)> List/Edit available sources"
-       extra_command "timer" "[<add> <tasks> <hour> [<minute>] [<weekday>]]|[<remove> <line no.>] List/Edit cron update intervals"
-else
-       EXTRA_COMMANDS="status suspend resume query report list timer version"
-       EXTRA_HELP="    status  Service status
-       suspend Suspend adblock processing
-       resume  Resume adblock processing
-       query   <domain> Query active blocklists and backups for a specific domain
-       report  [[<cli>|<mail>|<gen>|<json>] [<count>] [<search>]] Print DNS statistics with an optional search parameter
-       list    [<add>|<add_sha>|<add_utc>|<add_eng>|<add_stb>|<remove>|<remove_sha>|<remove_utc>|<remove_eng>|<remove_stb>] <source(s)> List/Edit available sources
-       timer   [<add> <tasks> <hour> [<minute>] [<weekday>]]|[<remove> <line no.>] List/Edit cron update intervals"
-fi
+extra_command "suspend" "Suspend adblock processing"
+extra_command "resume" "Resume adblock processing"
+extra_command "query" "<domain> Query active blocklists and backups for a specific domain"
+extra_command "report" "[[<cli>|<mail>|<gen>|<json>] [<top_count>] [<res_count>] [<search>]] Print DNS statistics with an optional search parameter"
+extra_command "list" "[<add>|<add_sha>|<add_utc>|<add_eng>|<add_stb>|<remove>|<remove_sha>|<remove_utc>|<remove_eng>|<remove_stb>] <source(s)> List/Edit available sources"
+extra_command "timer" "[<add> <tasks> <hour> [<minute>] [<weekday>]]|[<remove> <line no.>] List/Edit cron update intervals"
 
 adb_init="/etc/init.d/adblock"
 adb_script="/usr/bin/adblock.sh"
@@ -34,7 +23,7 @@ if [ -s "${adb_pidfile}" ] && { [ "${action}" = "start" ] || [ "${action}" = "st
        [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "report" ] ||
        [ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ] ||
        { [ "${action}" = "list" ] && [ -n "${1}" ]; }; }; then
-       exit 0
+       return 0
 fi
 
 boot() {
index 492edbaa9e19bc7710c1f7e05f073a5cc4353f43..f2a9623785edeeee52bf159ed1c00982d998078c 100755 (executable)
@@ -400,7 +400,7 @@ f_fetch() {
                        ;;
                "curl")
                        [ "${adb_fetchinsecure}" = "1" ] && insecure="--insecure"
-                       adb_fetchparm="${adb_fetchparm:-"${insecure} --connect-timeout 20 --silent --show-error --location -o"}"
+                       adb_fetchparm="${adb_fetchparm:-"${insecure} --connect-timeout 20 --fail --silent --show-error --location -o"}"
                        ;;
                "uclient-fetch")
                        [ "${adb_fetchinsecure}" = "1" ] && insecure="--no-check-certificate"
index 2d69c09d5c32ff0c62ae3028247f5ae5ad92e84b..4d908249a465f30313340c492b4856177f44cf24 100644 (file)
                "descurl": "https://github.com/notracking/hosts-blocklists"
        },
        "oisd_basic": {
-               "url": "https://dblw.oisd.nl/basic/",
+               "url": "https://raw.githubusercontent.com/sjhgvr/oisd/main/dblw_basic.txt",
                "rule": "/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "L",
                "focus": "general",
                "descurl": "https://oisd.nl"
        },
        "oisd_nsfw": {
-               "url": "https://dblw.oisd.nl/nsfw/",
+               "url": "https://raw.githubusercontent.com/sjhgvr/oisd/main/dblw_nsfw.txt",
                "rule": "/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XL",
                "focus": "general",
                "descurl": "https://oisd.nl"
        },
        "oisd_full": {
-               "url": "https://dblw.oisd.nl",
+               "url": "https://raw.githubusercontent.com/sjhgvr/oisd/main/dblw_full.txt",
                "rule": "/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XXL",
                "focus": "general",