adblock: update 3.8.9

* more startup tweaks
* re-use f_log function in helper scripts
* small fixes / polish up for forthcoming 19.07 release

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 2c3cb6f1d1)
This commit is contained in:
Dirk Brenken
2019-11-06 20:29:48 +01:00
parent bc89112c27
commit fff155b2bf
5 changed files with 45 additions and 45 deletions
+4 -12
View File
@@ -13,7 +13,7 @@
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
adb_ver="3.8.8"
adb_ver="3.8.9"
adb_basever=""
adb_enabled=0
adb_debug=0
@@ -283,13 +283,12 @@ f_temp()
if [ -d "/tmp" ] && [ -z "${adb_tmpdir}" ]
then
adb_tmpdir="$(mktemp -p /tmp -d)"
adb_tmpload="$(mktemp -p "${adb_tmpdir}" -tu)"
adb_tmpfile="$(mktemp -p "${adb_tmpdir}" -tu)"
elif [ ! -d "/tmp" ]
then
f_log "err" "the temp directory '/tmp' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start"
fi
if [ ! -s "${adb_pidfile}" ]
if [ ! -f "${adb_pidfile}" ] || [ ! -s "${adb_pidfile}" ]
then
printf "%s" "${$}" > "${adb_pidfile}"
fi
@@ -929,13 +928,6 @@ f_log()
f_rmdns
f_bgserv "stop"
f_jsnup "error"
log_msg="Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'"
if [ -x "${adb_logger}" ]
then
"${adb_logger}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg}"
else
printf "%s %s %s\\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg}"
fi
exit 1
fi
fi
@@ -979,8 +971,8 @@ f_main()
src_url="$(eval printf "%s" \"\$\{adb_src_${src_name}\}\")"
src_rset="$(eval printf "%s" \"\$\{adb_src_rset_${src_name}\}\")"
src_cat="$(eval printf "%s" \"\$\{adb_src_cat_${src_name}\}\")"
src_tmpload="${adb_tmpload}.${src_name}"
src_tmpfile="${adb_tmpfile}.${src_name}"
src_tmpload="${adb_tmpfile}.${src_name}.load"
src_tmpfile="${adb_tmpfile}.${src_name}.file"
src_rc=4
# basic pre-checks