3 пункт add возврат hostlist

This commit is contained in:
StressOzz authored and GitHub committed 2025-10-31 23:38:26 +05:00
1 parent c8f015b2f2
commit 0e750f4c2d
1 file changed
+13 -1
+13 -1
View File
@@ -520,12 +520,24 @@ comeback_def () {
if [ -f /opt/zapret/restore-def-cfg.sh ]; then if [ -f /opt/zapret/restore-def-cfg.sh ]; then
rm -f /opt/zapret/init.d/openwrt/custom.d/50-script.sh rm -f /opt/zapret/init.d/openwrt/custom.d/50-script.sh
[ -f /etc/init.d/zapret ] && /etc/init.d/zapret stop >/dev/null 2>&1 [ -f /etc/init.d/zapret ] && /etc/init.d/zapret stop >/dev/null 2>&1
echo -e "${GREEN}🔴 ${CYAN}Возвращаем настройки, стратегию и Host list к значениям по умолчанию${NC}"
echo -e ""
IPSET_DIR="/opt/zapret/ipset"
mkdir -p "$IPSET_DIR"
FILES="zapret-hosts-google.txt zapret-hosts-user-exclude.txt"
URL_BASE="https://raw.githubusercontent.com/remittor/zapret-openwrt/master/zapret/ipset"
for f in $FILES; do
curl -fsSLo "$IPSET_DIR/$f" "$URL_BASE/$f"
done
chmod +x /opt/zapret/restore-def-cfg.sh chmod +x /opt/zapret/restore-def-cfg.sh
/opt/zapret/restore-def-cfg.sh /opt/zapret/restore-def-cfg.sh
chmod +x /opt/zapret/sync_config.sh chmod +x /opt/zapret/sync_config.sh
/opt/zapret/sync_config.sh /opt/zapret/sync_config.sh
[ -f /etc/init.d/zapret ] && /etc/init.d/zapret restart >/dev/null 2>&1 [ -f /etc/init.d/zapret ] && /etc/init.d/zapret restart >/dev/null 2>&1
echo -e "${BLUE}🔴 ${GREEN}Настройки возвращены, сервис перезапущен !${NC}" echo -e "${BLUE}🔴 ${GREEN}Настройки по умолчанию возвращены !${NC}"
else else
echo -e "${RED}Zapret не установлен !${NC}" echo -e "${RED}Zapret не установлен !${NC}"
fi fi