diff --git a/luci-app-mosdns/Makefile b/luci-app-mosdns/Makefile index 9e81e03a..c08215f8 100644 --- a/luci-app-mosdns/Makefile +++ b/luci-app-mosdns/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-mosdns -PKG_VERSION:=1.5.17 +PKG_VERSION:=1.5.18 PKG_RELEASE:=1 LUCI_TITLE:=LuCI Support for mosdns diff --git a/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua b/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua index e10da072..4af0903e 100644 --- a/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua +++ b/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua @@ -174,8 +174,7 @@ o.default = "geosite.dat" o:value("geosite.dat", "v2ray-geosite") o:value("https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt", "anti-AD") o:value("https://raw.githubusercontent.com/Cats-Team/AdRules/main/mosdns_adrules.txt", "Cats-Team/AdRules") -o:value("https://raw.githubusercontent.com/ookangzheng/dbl-oisd-nl/master/dbl_light.txt", "oisd (small)") -o:value("https://raw.githubusercontent.com/ookangzheng/dbl-oisd-nl/master/dbl.txt", "oisd (big)") +o:value("https://raw.githubusercontent.com/neodevpro/neodevhost/master/domain", "NEO DEV HOST") o = s:taboption("basic", Button, "_reload", translate("Restart-Service"), translate("Restart the MosDNS process to take effect of new configuration")) o.write = function() diff --git a/luci-app-mosdns/root/etc/init.d/mosdns b/luci-app-mosdns/root/etc/init.d/mosdns index f12b5a8e..3d9f580b 100755 --- a/luci-app-mosdns/root/etc/init.d/mosdns +++ b/luci-app-mosdns/root/etc/init.d/mosdns @@ -228,7 +228,9 @@ start_service() { if [ -f "/etc/mosdns/rule/.ad_source" ]; then for url in $ad_source; do - [ "$url" = "geosite.dat" ] && continue + if [ "$url" = "geosite.dat" ] || [ $(echo "$url" | grep -c -E "^file://") -eq 1 ]; then + continue + fi if [ $(grep -c "$url" "/etc/mosdns/rule/.ad_source") -eq 0 ]; then update_list=1 break diff --git a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh index eb6411b8..fa9ffca4 100755 --- a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh +++ b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh @@ -54,10 +54,17 @@ get_adlist() ( adlist_update() { [ "$(uci -q get mosdns.config.adblock)" != 1 ] && exit 0 + lock_file=/var/lock/mosdns_ad_update.lock ad_source=$(uci -q get mosdns.config.ad_source) AD_TMPDIR=$(mktemp -d) || exit 1 mirror="" : > /etc/mosdns/rule/.ad_source + if [ -f "$lock_file" ]; then + has_update=0 + exit 0 + else + : > $lock_file + fi has_update=0 for url in $ad_source; do @@ -83,7 +90,7 @@ adlist_update() { \cp $AD_TMPDIR/* /etc/mosdns/rule/adlist } fi - rm -rf "$AD_TMPDIR" + rm -rf "$AD_TMPDIR" $lock_file } geodat_update() ( diff --git a/v2dat/Makefile b/v2dat/Makefile index d0fd37aa..a9fabfa0 100644 --- a/v2dat/Makefile +++ b/v2dat/Makefile @@ -22,6 +22,8 @@ PKG_MAINTAINER:=sbwml PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/urlesistiana/v2dat