> On Nov 30, 2026, at 01:19, Martin Husemann <[email protected]> wrote:
> 
> On Sun, Nov 29, 2026 at 10:21:55AM -0700, Brook Milligan wrote:
>> +if checkyesno check_blocklist; then
>> + echo ""
>> + echo "blocklist:"
>> + blocklistctl dump ${check_blocklist_flags}
>> + echo ""
>> +fi
> 
> This all looks good to me, but I have an additional feature request :-)
> 
> Could we make an optional summary version of this? I don't
> want to have 100eds of blocked IPs in my daily, but would like to see
> a one-line-per service summary (easy awk job), like:
> 
> service blocked
> 22 41
> 587 542

Interesting idea.  I think you mean something like the following:

if checkyesno check_blocklist; then
        echo ""
        echo "blocklist summary:"
        (echo "service  blocked"; \
                blocklistctl dump -b \
                | sed -e 's/:/ /‘ \
                | awk 'NR>1 {a[$3]++;} END { for (i in a) print i, "\t", a[i]; 
}’ \
                | sort -k 1,1n;
        )
fi

How do you imagine this being controlled?  That is, how best to differentiate 
between a request for the detailed list and one for the summary?  Are you 
imagining another rc variable, e.g., check_blocklist_summary?

Cheers,
Brook

Reply via email to