diff --git a/zapret/comfunc.sh b/zapret/comfunc.sh index 50e3fbd..dc85079 100755 --- a/zapret/comfunc.sh +++ b/zapret/comfunc.sh @@ -145,6 +145,12 @@ function insert_cron_task_logs function init_before_start { local DAEMON_LOG_ENABLE=$1 + local HOSTLIST_FN="$ZAPRET_BASE/ipset/zapret-hosts-user.txt" + [ ! -f "$HOSTLIST_FN" ] && touch "$HOSTLIST_FN" + local HOSTLIST_SZ=$( wc -c < "$HOSTLIST_FN" ) + if [ "$HOSTLIST_SZ" -le 3 ]; then + echo "abra-cadabra.com" > "$HOSTLIST_FN" + fi chmod 644 $ZAPRET_BASE/ipset/*.txt chmod 666 $ZAPRET_BASE/ipset/*.log rm -f /tmp/zapret*.log