Command Line switch to force answer to "Update"?

Issued the command below, and was prompted to (U)update cert or (C)confirm - can anyone point me to a command line switch that automatically answers this question? Needed for an automated sequence.

/usr/bin/certbot certonly --webroot --webroot-path /var/www/http02/000-http02.example.com/COMMON/root --expand --cert-name http02.example.com --domain site1.example.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None


You are updating certificate http02.example.com to include new domain(s):

You are also removing previously included domain(s):

Did you intend to make this change?


(U)pdate cert/(C)cancel:

There's a -n (noninteractive) flag

I'm not sure exactly what it'll do in this scenario

Try it with a --dry-run and see what it does

there's also an --expand which should automatically accept certificate expansion (the domain you're adding) but I don't see one for certificate contraction (the domain you're removing)

try -n --expand --dry-run and see where that gets you

4 Likes

Brilliant - that did the trick - not sure how I missed the "-n" in the documentation. May need additional coffee today :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.