From 148a397051a95c15fe061a738471e38b4aa2d4ff Mon Sep 17 00:00:00 2001 From: remittor Date: Wed, 30 Oct 2024 13:10:56 +0300 Subject: [PATCH] install: Replace default hostlist "zapret-hosts-user.txt" to "zapret-hosts-google.txt" --- zapret/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zapret/Makefile b/zapret/Makefile index c11debe..d183ceb 100644 --- a/zapret/Makefile +++ b/zapret/Makefile @@ -103,7 +103,15 @@ if [ -z "$${IPKG_INSTROOT}" ]; then # stop service if PKG_UPGRADE [ -x "/etc/init.d/zapret" ] && /etc/init.d/zapret stop >/dev/null 2>&1 fi -fi + if [ ! -f "/opt/zapret/ipset/zapret-hosts-google.txt" ]; then + if [ -f "/opt/zapret/ipset/zapret-hosts-user.txt" ]; then + CFGLISTHASH=$$( md5sum "/opt/zapret/ipset/zapret-hosts-user.txt" | awk '{print $$1;}' ) + if [ "$${CFGLISTHASH}" = "79e35df62b0d1ae455d0a7e04c4cecac" ]; then + rm -f "/opt/zapret/ipset/zapret-hosts-user.txt" + fi + fi + fi +fi exit 0 endef