adblock: update 3.8.4

* fix the 'adb_sysver' output
* pass the adblock version information to the helper scripts correctly

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2019-08-29 14:45:01 +02:00
parent 95189994e7
commit 161597f2fa
4 changed files with 13 additions and 12 deletions
+3 -3
View File
@@ -12,16 +12,16 @@ PATH="/usr/sbin:/usr/bin:/sbin:/bin"
if [ -r "/lib/functions.sh" ]
then
. "/lib/functions.sh"
adb_basever="$(uci_get adblock global adb_basever)"
adb_dns="$(uci_get adblock global adb_dns)"
fi
adb_ver="${1}"
adb_ubus="$(command -v ubus)"
if [ -x "${adb_ubus}" ] && [ -n "${adb_dns}" ]
then
logger -p "info" -t "adblock-${adb_basever} [${$}]" "ubus/adblock service started"
logger -p "info" -t "adblock-${adb_ver}[${$}]" "ubus/adblock service started"
"${adb_ubus}" -S -M r -m invoke monitor | \
{ grep -qE "\"method\":\"(set|signal)\",\"data\":\{\"name\":\"${adb_dns}\""; [ $? -eq 0 ] && /etc/init.d/adblock start; }
else
logger -p "err" -t "adblock-${adb_basever} [${$}]" "can't start ubus/adblock service"
logger -p "err" -t "adblock-${adb_ver}[${$}]" "can't start ubus/adblock service"
fi