From 0d8d081cdc244acc11cccf7d0d2f28ab37362a9b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:27:55 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20Sync=202024-12-21=2016:27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-passwall2/root/usr/share/passwall2/app.sh | 4 ++-- .../root/usr/share/passwall2/helper_dnsmasq.lua | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/luci-app-passwall2/root/usr/share/passwall2/app.sh b/luci-app-passwall2/root/usr/share/passwall2/app.sh index 3a67fcae..3d73de5c 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/app.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/app.sh @@ -794,7 +794,7 @@ run_global() { -DEFAULT_DNS ${AUTO_DNS} -LOCAL_DNS ${LOCAL_DNS:-${AUTO_DNS}} -TUN_DNS ${TUN_DNS} \ -NFTFLAG ${nftflag:-0} \ -NO_LOGIC_LOG ${NO_LOGIC_LOG:-0} - /etc/init.d/dnsmasq restart >/dev/null 2>&1 + lua $APP_PATH/helper_dnsmasq.lua logic_restart -LOG 1 else #Run a copy dnsmasq instance, DNS hijack for that need proxy devices. GLOBAL_DNSMASQ_PORT=$(get_new_port 11400) @@ -1256,7 +1256,7 @@ start() { uci -q commit ${CONFIG} uci -q set dhcp.@dnsmasq[0].dns_redirect='0' uci -q commit dhcp - /etc/init.d/dnsmasq restart >/dev/null 2>&1 + lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0 } fi [ "$ENABLED_DEFAULT_ACL" == 1 ] && run_global diff --git a/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua b/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua index 9e93b68e..3f74227b 100644 --- a/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua +++ b/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua @@ -102,10 +102,8 @@ function logic_restart(var) tinsert(dns_table, v) end end - if dns_table and #dns_table > 0 then - uci:set_list("dhcp", "@dnsmasq[0]", "server", dns_table) - uci:commit("dhcp") - end + uci:set_list("dhcp", "@dnsmasq[0]", "server", dns_table) + uci:commit("dhcp") end sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1") restore_servers()