Fix sig-count parsing in start.sh — clamd logs 'Loaded N signatures.'

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) <noreply@anthropic.com>
This commit is contained in:
tobias
2026-05-05 18:32:51 +02:00
parent d73188c3b9
commit 93b2e4d264
+2 -1
View File
@@ -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