Am 16.07.2020 um 07:49 schrieb Paul de Weerd:
> What I have is this:
>
> for DOMAIN in `awk '/^domain/ {print $2}' /etc/acme-client.conf`My script is similar to this... > As I need to update OCSP staples per domain anyway, doing a per-domain > song-and-dance makes sense for me. Since I set the 'handle' of the > domain to the actual (DNS) domain name (no need for the domain name > option in the file), this works out quite well. Yes, handling this externally is probably best... > | Maybe an easy solution would be an option that prints the list of all > | domains, so I can avoid the sed parsing, as this is prone to breaking. > > Why is it prone to breaking? You can only break it yourself by > introducing changes that break your script. Sounds like a case of > "doctor, it hurts when I do X"? Well, my script actually broke twice, once with the introduction of the -nv option and once with the introduction of the domain name option. As you've showed, this can be fixed by just parsing the config file itself instead of the acme-client output, but it still might be cleaner to have this handled by acme-client with the proper parser...
