diff options
author | Stan Grishin <stangri@melmac.ca> | 2023-12-15 02:47:28 +0000 |
---|---|---|
committer | Stan Grishin <stangri@melmac.ca> | 2023-12-15 02:49:08 +0000 |
commit | 8d8ca1c6aace056dbcf4216ca797902c0099c2fb (patch) | |
tree | aeebd0b6ce7a76abddab5c943fb472e275176638 /applications/luci-app-adblock-fast/root/usr/libexec/rpcd | |
parent | d06b0c9e25e627707ffebe6f76a4aeb18a690d82 (diff) |
luci-app-adblock-fast: update to 1.1.1-1
* Final (hopefully) attempt to avoid errors if dhcp/smartdns configs are
missing
* New user experience for picking dnsmasq/smartdns instances to enable the
adblocking on
* use function from init script to set up output paths
* update paths to run-time files in ACL
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'applications/luci-app-adblock-fast/root/usr/libexec/rpcd')
-rwxr-xr-x | applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast index 9ca94c7878..63c50c403d 100755 --- a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast +++ b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast @@ -95,7 +95,7 @@ get_init_status() { local name name="$(basename "$1")" name="${name:-$packageName}" - local errors warnings ports dns outputFile outputCache outputGzip + local errors warnings ports dns outputFile outputCache outputGzip outputConfig local i j # shellcheck disable=SC2034 local compressed_cache_dir @@ -106,46 +106,11 @@ get_init_status() { if [ -n "$(uci_get "$packageName" 'config' 'dnsmasq_config_file_url')" ]; then dns="dnsmasq.conf" else - dns="$(uci_get "$packageName" 'config' 'dns')" + dns="$(uci_get "$packageName" 'config' 'dns' 'dnsmasq.servers')" fi - case "$dns" in - dnsmasq.addnhosts) - outputFile="$dnsmasqAddnhostsFile" - outputCache="$dnsmasqAddnhostsCache" - outputGzip="${compressed_cache_dir}/${dnsmasqAddnhostsGzip}" - ;; - dnsmasq.conf) - outputFile="$dnsmasqConfFile" - outputCache="$dnsmasqConfCache" - outputGzip="${compressed_cache_dir}/${dnsmasqConfGzip}" - ;; - dnsmasq.ipset) - outputFile="$dnsmasqIpsetFile" - outputCache="$dnsmasqIpsetCache" - outputGzip="${compressed_cache_dir}/${dnsmasqIpsetGzip}" - ;; - dnsmasq.nftset) - outputFile="$dnsmasqNftsetFile" - outputCache="$dnsmasqNftsetCache" - outputGzip="${compressed_cache_dir}/${dnsmasqNftsetGzip}" - ;; - dnsmasq.servers) - outputFile="$dnsmasqServersFile" - outputCache="$dnsmasqServersCache" - outputGzip="${compressed_cache_dir}/${dnsmasqServersGzip}" - ;; - smartdns.domainset) - outputFilter="$smartdnsDomainSetFilter" - outputFile="$smartdnsDomainSetFile" - outputCache="$smartdnsDomainSetCache" - outputGzip="${compressed_cache_dir}/${smartdnsDomainSetGzip}" - ;; - unbound.adb_list) - outputFile="$unboundFile" - outputCache="$unboundCache" - outputGzip="${compressed_cache_dir}/${unboundGzip}" - ;; - esac + + dns_set_output_values "$dns" + json_init json_add_object "$name" json_add_boolean 'enabled' "$(is_enabled "$name")" |