fix: выход с ошибкой, если нет ни одного канала NOTIFY_CHAIN

This commit is contained in:
ssh-monitor
2026-04-14 09:55:03 +10:00
parent a90efd3ed8
commit a3bd7ed9ad
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -323,6 +323,10 @@ validate_config() {
validate_numeric_or_default "BRUTE_NOTIFY_COOLDOWN_SEC" "3600"
validate_numeric_or_default "MAIL_SMTP_PORT" "587"
refresh_notify_chain
if [ "${#NOTIFY_CHAIN[@]}" -eq 0 ]; then
printf '%s\n' 'Не настроен ни один канал отправки оповещений' >&2
exit 1
fi
}
# ============================================