From 5376e2bae34994a2cef2d314c98f2972c7c39558 Mon Sep 17 00:00:00 2001 From: Snowy-Fluffy Date: Sat, 3 Jan 2026 15:58:18 +0300 Subject: [PATCH] fix --- files/config.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/config.sh b/files/config.sh index 46bc2f4..caa36ef 100755 --- a/files/config.sh +++ b/files/config.sh @@ -478,6 +478,10 @@ check_conf() { done manage_service restart check_list + configs=($(ls /opt/zapret/zapret.cfgs/configurations/ | sort)) + if [[ ${#configs[@]} -eq 0 ]]; then + error_exit "\e[31mне найдено ни одной стратегии в /opt/zapret/zapret.cfgs/configurations/\e[0m" + fi echo -e "\e[36mНачинаем проверку всех стратегий...\e[0m" echo -e "\e[33mВсего стратегий: ${#configs[@]}\e[0m" echo "" @@ -565,6 +569,10 @@ check_conf_simple() { rm -f /opt/zapret/ipset/zapret-hosts-user.txt cp -r /opt/zapret/zapret.cfgs/lists/list-simple.txt /opt/zapret/ipset/zapret-hosts-user.txt check_list + configs=($(ls /opt/zapret/zapret.cfgs/configurations/ | sort)) + if [[ ${#configs[@]} -eq 0 ]]; then + error_exit "\e[31mне найдено ни одной стратегии в /opt/zapret/zapret.cfgs/configurations/\e[0m" + fi echo -e "\e[36mНачинаем проверку всех стратегий...\e[0m" echo -e "\e[33mВсего стратегий: ${#configs[@]}\e[0m" echo ""