mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-27 04:40:34 +03:00
Fix uci-def-cfg.sh
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2024 remittor
|
||||
|
||||
[ ! -f /opt/zapret2/comfunc.sh ] && exit 0
|
||||
|
||||
. /opt/zapret2/comfunc.sh
|
||||
|
||||
mkdir -p $ZAPRET_BASE/ipset
|
||||
|
||||
# create empty txt files into ipset directory
|
||||
[ ! -f "$ZAPRET_BASE/ipset/zapret-hosts-google.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-hosts-google.txt"
|
||||
#[ ! -f "$ZAPRET_BASE/ipset/zapret-hosts-auto.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-hosts-auto.txt"
|
||||
[ ! -f "$ZAPRET_BASE/ipset/zapret-hosts-auto.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-hosts-auto.txt"
|
||||
[ ! -f "$ZAPRET_BASE/ipset/zapret-hosts-user.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-hosts-user.txt"
|
||||
[ ! -f "$ZAPRET_BASE/ipset/zapret-hosts-user-ipban.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-hosts-user-ipban.txt"
|
||||
#[ ! -f "$ZAPRET_BASE/ipset/zapret-ip.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-ip.txt"
|
||||
@@ -14,5 +18,6 @@
|
||||
[ ! -f "$ZAPRET_BASE/ipset/zapret-ip-user-ipban.txt" ] && touch "$ZAPRET_BASE/ipset/zapret-ip-user-ipban.txt"
|
||||
|
||||
# create or merge uci-config
|
||||
[ ! -f "$ZAPRET_BASE/renew-cfg.sh" ] && exit 0
|
||||
$ZAPRET_BASE/renew-cfg.sh
|
||||
|
||||
Reference in New Issue
Block a user