diff --git a/zapret/Makefile b/zapret/Makefile index a78d1ce..db6c53f 100644 --- a/zapret/Makefile +++ b/zapret/Makefile @@ -242,6 +242,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/zapret/comfunc.sh b/zapret/comfunc.sh index d4fb078..1dc9289 100755 --- a/zapret/comfunc.sh +++ b/zapret/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