Fix ipv6 cert cannot be found
the old code only check the folder with "." for di in "${CERT_HOME}"/*.*/; do
if we have a ipv6 ip cert like this 2001:db8::_ecc
because it doesn't contain "." it cannot be found and renewed
But this will cause the log to display some incorrect folders (although they are safely skipped)
[Wed Aug 20 05:53:38 AM BST 2025] Renewing: 'ca'
[Wed Aug 20 05:53:38 AM BST 2025] 'ca' is not an issued domain, skipping.
[Wed Aug 20 05:53:38 AM BST 2025] Skipped ca
[Wed Aug 20 05:53:38 AM BST 2025] Renewing: 'deploy'
[Wed Aug 20 05:53:38 AM BST 2025] 'deploy' is not an issued domain, skipping.
[Wed Aug 20 05:53:38 AM BST 2025] Skipped deploy
[Wed Aug 20 05:53:38 AM BST 2025] Renewing: 'dnsapi'
[Wed Aug 20 05:53:38 AM BST 2025] 'dnsapi' is not an issued domain, skipping.
[Wed Aug 20 05:53:38 AM BST 2025] Skipped dnsapi
[Wed Aug 20 05:53:38 AM BST 2025] Renewing: 'notify'
[Wed Aug 20 05:53:38 AM BST 2025] 'notify' is not an issued domain, skipping.
[Wed Aug 20 05:53:38 AM BST 2025] Skipped notify
shall we skip this 4 folders?
Just a thought but as a naive approach could you just glob over "${CERT_HOME}"/*[.:]*/; do in order to get directories containing . or : since IPv6 addresses likely have a : in them?
that seems better.
Just a thought but as a naive approach could you just glob over
"${CERT_HOME}"/*[.:]*/; doin order to get directories containing . or : since IPv6 addresses likely have a : in them?
Is all shells can support regex?
This is not a regular expression. It is a directory pattern match using globbing. You can find out more in the bash manual under the topic of pattern matching.
It is pretty widely supported among shells and at very least works in bash, dash, and sh which are listed as this project's supported shells.
It also works on my machine in zsh and tcsh.