#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_scriptver="1.5.2"
+adb_scriptver="1.5.4"
adb_mincfgver="2.5"
adb_hotplugif=""
adb_lanif="lan"
if [ "${package_ok}" = "true" ]
then
adb_fetch="$(which uclient-fetch)"
- fetch_parm="-q --timeout=${adb_fetchttl}"
- response_parm="--spider"
+ fetch_parm="-q"
+ response_parm=
fi
fi
fi
f_depend "wget -" "true"
if [ "${package_ok}" = "true" ]
then
- adb_fetch="$(which wget)"
+ adb_fetch="$(which /usr/bin/wget* | head -1)"
fetch_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=${adb_fetchttl} --connect-timeout=${adb_fetchttl} --read-timeout=${adb_fetchttl}"
response_parm="--spider --server-response"
- else
+ fi
+ if [ -z "${adb_fetch}" ]
+ then
rc=-1
f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock"
f_exit
# main loop for all block list sources
#
+f_log "use '${adb_fetch}' for list downloads"
+
for src_name in ${adb_sources}
do
# check disabled sources
if [ "${src_name}" = "blacklist" ]
then
url_time="$(date -r "${url}")"
- else
+ elif [ -n "${response_parm}" ]
+ then
url_time="$(${adb_fetch} ${fetch_parm} ${response_parm} "${url}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}')"
fi
if [ -z "${url_time}" ]