Browse Source

adblock: update 1.3.2

* only a few more fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>

Euro 16: germany vs. italy 6:5 (after 18 penalties) :-)
lilik-openwrt-22.03
Dirk Brenken 9 years ago
parent
commit
4bb8a34bbf
3 changed files with 31 additions and 33 deletions
  1. +1
    -1
      net/adblock/Makefile
  2. +29
    -31
      net/adblock/files/adblock-helper.sh
  3. +1
    -1
      net/adblock/files/adblock-update.sh

+ 1
- 1
net/adblock/Makefile View File

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


+ 29
- 31
net/adblock/files/adblock-helper.sh View File

@ -422,25 +422,21 @@ f_envcheck()
# check volatile uhttpd instance configuration
#
check="$(pgrep -f "uhttpd -h /www/adblock")"
if [ -z "${check}" ]
if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
then
if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
then
f_uhttpd "adbIPv4+6_80" "1" "-p ${adb_ipv4}:${adb_nullport} -p [${adb_ipv6}]:${adb_nullport}"
f_uhttpd "adbIPv4+6_443" "0" "-p ${adb_ipv4}:${adb_nullportssl} -p [${adb_ipv6}]:${adb_nullportssl}"
elif [ -n "${adb_wanif4}" ]
then
f_uhttpd "adbIPv4_80" "1" "-p ${adb_ipv4}:${adb_nullport}"
f_uhttpd "adbIPv4_443" "0" "-p ${adb_ipv4}:${adb_nullportssl}"
else
f_uhttpd "adbIPv6_80" "1" "-p [${adb_ipv6}]:${adb_nullport}"
f_uhttpd "adbIPv6_443" "0" "-p [${adb_ipv6}]:${adb_nullportssl}"
fi
if [ "${uhttpd_ok}" = "true" ]
then
f_log "created volatile uhttpd instances"
fi
f_uhttpd "adbIPv4+6_80" "1" "-p ${adb_ipv4}:${adb_nullport} -p [${adb_ipv6}]:${adb_nullport}"
f_uhttpd "adbIPv4+6_443" "0" "-p ${adb_ipv4}:${adb_nullportssl} -p [${adb_ipv6}]:${adb_nullportssl}"
elif [ -n "${adb_wanif4}" ]
then
f_uhttpd "adbIPv4_80" "1" "-p ${adb_ipv4}:${adb_nullport}"
f_uhttpd "adbIPv4_443" "0" "-p ${adb_ipv4}:${adb_nullportssl}"
else
f_uhttpd "adbIPv6_80" "1" "-p [${adb_ipv6}]:${adb_nullport}"
f_uhttpd "adbIPv6_443" "0" "-p [${adb_ipv6}]:${adb_nullportssl}"
fi
if [ "${uhttpd_ok}" = "true" ]
then
f_log "created volatile uhttpd instances"
fi
# check whitelist entries
@ -471,7 +467,6 @@ f_depend()
elif [ -z "${check}" ]
then
rc=-1
package_ok="false"
f_log "package '${package}' not found"
f_exit
fi
@ -490,7 +485,6 @@ f_firewall()
local chpos="${5}"
local notes="adb-${6}"
local rules="${7}"
firewall_ok="true"
# select appropriate iptables executable for IPv6
#
@ -528,9 +522,10 @@ f_firewall()
then
"${ipt}" -w -t "${table}" -I "${chain}" "${chpos}" -m comment --comment "${notes}" ${rules}
rc=${?}
if [ $((rc)) -ne 0 ]
if [ $((rc)) -eq 0 ]
then
firewall_ok="false"
firewall_ok="true"
else
f_log "failed to initialize volatile ${proto} firewall rule '${notes}'"
f_exit
fi
@ -541,18 +536,23 @@ f_firewall()
#
f_uhttpd()
{
local check
local realm="${1}"
local timeout="${2}"
local ports="${3}"
uhttpd_ok="true"
uhttpd -h "/www/adblock" -N 25 -T "${timeout}" -r "${realm}" -k 0 -t 0 -R -D -S -E "/index.html" ${ports}
rc=${?}
if [ $((rc)) -ne 0 ]
check="$(pgrep -f "uhttpd -h /www/adblock -N 25 -T ${timeout} -r ${realm}")"
if [ -z "${check}" ]
then
uhttpd_ok="false"
f_log "failed to initialize volatile uhttpd instance (${realm})"
f_exit
uhttpd -h "/www/adblock" -N 25 -T "${timeout}" -r "${realm}" -k 0 -t 0 -R -D -S -E "/index.html" ${ports}
rc=${?}
if [ $((rc)) -eq 0 ]
then
uhttpd_ok="true"
else
f_log "failed to initialize volatile uhttpd instance (${realm})"
f_exit
fi
fi
}
@ -570,8 +570,6 @@ f_space()
then
space_ok="false"
fi
else
space_ok="false"
fi
}


+ 1
- 1
net/adblock/files/adblock-update.sh View File

@ -10,7 +10,7 @@
#
adb_pid="${$}"
adb_pidfile="/var/run/adblock.pid"
adb_scriptver="1.3.1"
adb_scriptver="1.3.2"
adb_mincfgver="2.2"
adb_scriptdir="${0%/*}"
if [ -r "${adb_pidfile}" ]


Loading…
Cancel
Save