From db1833e93cfd81ef93c4dc23ec67fa19e662e311 Mon Sep 17 00:00:00 2001 From: remittor Date: Sun, 25 Jan 2026 09:59:59 +0300 Subject: [PATCH] makefile: Cleanup custom.d directory --- zapret2/Makefile | 4 ++++ zapret2/comfunc.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/zapret2/Makefile b/zapret2/Makefile index 6bac5b0..9013084 100644 --- a/zapret2/Makefile +++ b/zapret2/Makefile @@ -251,6 +251,10 @@ if [ -z "$${IPKG_INSTROOT}" ]; then chmod 644 $${ZAPRET_DIR}/ipset_def/*.txt >/dev/null 2>&1 chmod 644 $${ZAPRET_DIR}/init.d/openwrt/custom.d/*.sh >/dev/null 2>&1 chmod 644 $${ZAPRET_DIR}/config* >/dev/null 2>&1 + # cleanup custom.d directory + rm -f $${ZAPRET_DIR}/init.d/openwrt/custom.d/*-opkg* + rm -f $${ZAPRET_DIR}/init.d/openwrt/custom.d/*.opkg* + rm -f $${ZAPRET_DIR}/init.d/openwrt/custom.d/*.apk* # creating main config if its not exists if [ ! -f "$${ZAPRET_CONFIG}" ]; then cp -f "$${ZAPRET_CONFIG_DEF}" "$${ZAPRET_CONFIG}" diff --git a/zapret2/comfunc.sh b/zapret2/comfunc.sh index c4b51f6..48c5f99 100755 --- a/zapret2/comfunc.sh +++ b/zapret2/comfunc.sh @@ -193,6 +193,9 @@ function init_before_start [ ! -f "$HOSTLIST_FN" ] && touch "$HOSTLIST_FN" chmod 644 $ZAPRET_BASE/ipset/*.txt chmod 666 $ZAPRET_BASE/ipset/*.log + rm -f $ZAPRET_BASE/init.d/openwrt/custom.d/*-opkg* + rm -f $ZAPRET_BASE/init.d/openwrt/custom.d/*.opkg* + rm -f $ZAPRET_BASE/init.d/openwrt/custom.d/*.apk* rm -f /tmp/$ZAPRET_CFG_NAME+*.log #*/ if [ "$DAEMON_LOG_ENABLE" = "1" ]; then