From 4c3cdcb68e8fec3969d2dec73714e1f11c1c749c Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Wed, 6 Dec 2023 10:27:01 +0000 Subject: luci-app-adblock-fast: sync with principal package * add support for smartdns ipset/nftset-based blocking Signed-off-by: Stan Grishin --- .../root/usr/libexec/rpcd/luci.adblock-fast | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'applications/luci-app-adblock-fast/root/usr/libexec') 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 699b286d84..9ca94c7878 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 @@ -251,25 +251,35 @@ get_platform_support() { else json_add_boolean 'dnsmasq_installed' '0' fi + if check_dnsmasq_ipset; then + json_add_boolean 'dnsmasq_ipset_support' '1' + else + json_add_boolean 'dnsmasq_ipset_support' '0' + fi + if check_dnsmasq_nftset; then + json_add_boolean 'dnsmasq_nftset_support' '1' + else + json_add_boolean 'dnsmasq_nftset_support' '0' + fi if check_smartdns; then json_add_boolean 'smartdns_installed' '1' else json_add_boolean 'smartdns_installed' '0' fi - if check_unbound; then - json_add_boolean 'unbound_installed' '1' + if check_smartdns_ipset; then + json_add_boolean 'smartdns_ipset_support' '1' else - json_add_boolean 'unbound_installed' '0' + json_add_boolean 'smartdns_ipset_support' '0' fi - if check_dnsmasq_ipset; then - json_add_boolean 'dnsmasq_ipset_support' '1' + if check_smartdns_nftset; then + json_add_boolean 'smartdns_nftset_support' '1' else - json_add_boolean 'dnsmasq_ipset_support' '0' + json_add_boolean 'smartdns_nftset_support' '0' fi - if check_dnsmasq_nftset; then - json_add_boolean 'dnsmasq_nftset_support' '1' + if check_unbound; then + json_add_boolean 'unbound_installed' '1' else - json_add_boolean 'dnsmasq_nftset_support' '0' + json_add_boolean 'unbound_installed' '0' fi json_add_array 'leds' for i in /sys/class/leds/*; do json_add_string '' "$(basename "$i")"; done -- cgit v1.2.3