Skip to content

Conversation

Fangliding
Copy link

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

@Fangliding
Copy link
Author

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?

@coderjoe
Copy link
Contributor

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?

@Neilpang
Copy link
Member

that seems better.

@Fangliding
Copy link
Author

Fangliding commented Sep 27, 2025

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?

Is all shells can support regex?

@coderjoe
Copy link
Contributor

coderjoe commented Sep 28, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants