Fix healthcheck false positive in logs

This commit is contained in:
BeauTroll
2025-12-16 08:52:30 +01:00
parent fa78f80d73
commit 6f3b3888a2

View File

@@ -197,7 +197,7 @@ if journalctl -u borgmatic.service -n 1 &> /dev/null; then
fi fi
# Chercher des erreurs récentes # Chercher des erreurs récentes
ERROR_COUNT=$(journalctl -u borgmatic.service --since "24 hours ago" -p err --no-pager 2>/dev/null | wc -l) ERROR_COUNT=$(journalctl -u borgmatic.service --since "24 hours ago" -p err --no-pager 2>/dev/null | grep -v "^-- No entries --$" | wc -l)
if [ "$ERROR_COUNT" -gt 0 ]; then if [ "$ERROR_COUNT" -gt 0 ]; then
echo -e "${RED}${ERROR_COUNT} erreurs dans les dernières 24h${NC}" echo -e "${RED}${ERROR_COUNT} erreurs dans les dernières 24h${NC}"
((ERRORS++)) ((ERRORS++))