v0.3.47 Fix noresolv 1

This commit is contained in:
itdoginfo
2025-05-10 12:50:01 +03:00
parent fae43d0471
commit 68f5f123ca
3 changed files with 8 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-podkop
PKG_VERSION:=0.3.46
PKG_VERSION:=0.3.47
PKG_RELEASE:=1
LUCI_TITLE:=LuCI podkop app

View File

@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=podkop
PKG_VERSION:=0.3.46
PKG_VERSION:=0.3.47
PKG_RELEASE:=1
PKG_MAINTAINER:=ITDog <podkop@itdog.info>

View File

@@ -163,7 +163,7 @@ stop_main() {
if [ -f /var/run/podkop_list_update.pid ]; then
pid=$(cat /var/run/podkop_list_update.pid)
if kill -0 "$pid"; then
if kill -0 "$pid" 2>/dev/null; then
kill "$pid" 2>/dev/null
log "Stopped list_update"
fi
@@ -378,8 +378,6 @@ save_dnsmasq_config() {
dnsmasq_add_resolver() {
log "Save dnsmasq config"
save_dnsmasq_config "dhcp.@dnsmasq[0].noresolv" "dhcp.@dnsmasq[0].podkop_noresolv"
save_dnsmasq_config "dhcp.@dnsmasq[0].cachesize" "dhcp.@dnsmasq[0].podkop_cachesize"
uci -q delete dhcp.@dnsmasq[0].podkop_server
for server in $(uci get dhcp.@dnsmasq[0].server 2>/dev/null); do
@@ -391,6 +389,9 @@ dnsmasq_add_resolver() {
fi
done
save_dnsmasq_config "dhcp.@dnsmasq[0].noresolv" "dhcp.@dnsmasq[0].podkop_noresolv"
save_dnsmasq_config "dhcp.@dnsmasq[0].cachesize" "dhcp.@dnsmasq[0].podkop_cachesize"
log "Configure dnsmasq for sing-box"
uci set dhcp.@dnsmasq[0].noresolv="1"
uci set dhcp.@dnsmasq[0].cachesize="0"
@@ -1225,8 +1226,8 @@ sing_box_config_vless() {
if [ $? -eq 0 ]; then
log "Config VLESS created successfully"
else
log "Error: VLESS invalid JSON config generated"
return 1
log "[critical] Error: VLESS invalid JSON config generated"
exit 1
fi
}