Browse Source

Merge pull request #2935 from dibdot/adblock

adblock: update 1.3.3
lilik-openwrt-22.03
Ted Hess 9 years ago
committed by GitHub
parent
commit
5fdb011c35
3 changed files with 20 additions and 7 deletions
  1. +1
    -1
      net/adblock/Makefile
  2. +1
    -1
      net/adblock/files/README.md
  3. +18
    -5
      net/adblock/files/adblock-update.sh

+ 1
- 1
net/adblock/Makefile View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=adblock PKG_NAME:=adblock
PKG_VERSION:=1.3.2
PKG_VERSION:=1.3.3
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+ PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>


+ 1
- 1
net/adblock/files/README.md View File

@ -58,7 +58,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
* status & error logging to stdout and syslog * status & error logging to stdout and syslog
* use two dynamic uhttpd instances as adblock pixel server, separated for ads delivered on port 80 and on port 443 * use two dynamic uhttpd instances as adblock pixel server, separated for ads delivered on port 80 and on port 443
* use dynamic iptables chains/rulesets for adblock related redirects/rejects * use dynamic iptables chains/rulesets for adblock related redirects/rejects
* init system support (start/stop/restart/reload/toggle)
* init system support (start/stop/restart/reload/toggle/stats/cfgup)
* hotplug support, the adblock start will be triggered by wan 'ifup' event * hotplug support, the adblock start will be triggered by wan 'ifup' event
* adblock toggle to quickly switch adblocking 'on' or 'off' * adblock toggle to quickly switch adblocking 'on' or 'off'
* optional: automatic adblock list backup/restore, backups will be (de-)compressed on the fly (disabled by default) * optional: automatic adblock list backup/restore, backups will be (de-)compressed on the fly (disabled by default)


+ 18
- 5
net/adblock/files/adblock-update.sh View File

@ -10,7 +10,7 @@
# #
adb_pid="${$}" adb_pid="${$}"
adb_pidfile="/var/run/adblock.pid" adb_pidfile="/var/run/adblock.pid"
adb_scriptver="1.3.2"
adb_scriptver="1.3.3"
adb_mincfgver="2.2" adb_mincfgver="2.2"
adb_scriptdir="${0%/*}" adb_scriptdir="${0%/*}"
if [ -r "${adb_pidfile}" ] if [ -r "${adb_pidfile}" ]
@ -145,10 +145,23 @@ do
unset tmp_domains unset tmp_domains
elif [ $((rc)) -eq 0 ] && [ -z "${tmp_domains}" ] elif [ $((rc)) -eq 0 ] && [ -z "${tmp_domains}" ]
then then
"${adb_uci}" -q delete "adblock.${src_name}.adb_src_count"
"${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=empty download"
f_log " empty source download, skipped"
continue
if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ]
then
gunzip -cf "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" > "${adb_tmpfile}"
count="$(wc -l < "${adb_tmpfile}")"
"${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=list restored"
f_log " empty source download, restored (${count} entries)"
else
if [ -r "${adb_dnsdir}/${adb_dnsprefix}.${src_name}" ]
then
rm -f "${adb_dnsdir}/${adb_dnsprefix}.${src_name}"
rm_done="true"
fi
"${adb_uci}" -q delete "adblock.${src_name}.adb_src_count"
"${adb_uci}" -q set "adblock.${src_name}.adb_src_timestamp=empty download"
f_log " empty source download, skipped"
continue
fi
else else
rc=0 rc=0
if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ] if [ "${backup_ok}" = "true" ] && [ -r "${adb_dir_backup}/${adb_dnsprefix}.${src_name}.gz" ]


Loading…
Cancel
Save