From 93b2e4d264dd4ec49d5f53b44ba860ae5f511a4c Mon Sep 17 00:00:00 2001 From: tobias Date: Tue, 5 May 2026 18:32:51 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20sig-count=20parsing=20in=20start.sh=20?= =?UTF-8?q?=E2=80=94=20clamd=20logs=20'Loaded=20N=20signatures.'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous grep matched lowercase 'loaded' which never appears, so the ready banner always reported '0 databases loaded' even when clamd had 3.8M sigs in memory. Parse the actual 'Loaded N signatures' line. Co-Authored-By: Claude Opus 4.7 (1M context) --- start.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 57087b4..54faede 100644 --- a/start.sh +++ b/start.sh @@ -13,7 +13,8 @@ start_clamd() { cat /tmp/clamd.log 2>/dev/null exit 2 fi - echo "clamd ready ($(cat /tmp/clamd.log 2>/dev/null | grep -c 'loaded') databases loaded)" + sigs=$(grep -oE 'Loaded [0-9]+ signatures' /tmp/clamd.log 2>/dev/null | grep -oE '[0-9]+' | tail -1) + echo "clamd ready (${sigs:-0} signatures loaded)" } case "${1}" in