f_log "err""'${adb_dns}' not running or executable"
elif[ ! -d "${adb_dnsdir}"]
then
f_log "err""'${adb_dnsdir}' dns backend directory not found"
fi
# inotify check
@ -208,7 +212,7 @@ f_load()
then
adb_dnsfilereset="false"
fi
f_log "info""Inotify is enabled for '${adb_dns}', adblock restart and file reset will be disabled"
f_log "info""inotify is enabled for '${adb_dns}', adblock restart and file reset will be disabled"
fi
}
@ -226,7 +230,7 @@ f_env()
#
if[ ! -d "${adb_backupdir}"]
then
f_log "err""the backup directory '${adb_backupdir}' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start"
f_log "err""backup directory '${adb_backupdir}' does not exist/is not mounted yet, please create the directory or raise the 'adb_triggerdelay' to defer the adblock start"
fi
# check fetch utility
@ -304,15 +308,23 @@ f_rmtemp()
#
f_rmdns()
{
if[ -n "${adb_dns}"]
local status dns_status rc
status="$(ubus -S call service list '{"name":"adblock"}' 2>/dev/null | jsonfilter -l1 -e '@["adblock"].instances.*.running' 2>/dev/null)"
if[ -n "${adb_dns}"]&&[ -n "${status}"]
then
dns_status="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}" 2>/dev/null | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running" 2>/dev/null)"