Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document (and implement if missing) support for setting answers to interactive questions #1566

Closed
bluecmd opened this Issue Nov 19, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@bluecmd
Copy link

bluecmd commented Nov 19, 2015

Currently I'm using the following cli.ini:

rsa-key-size = 4096

server = https://acme-v01.api.letsencrypt.org/directory
email = e@mail
domains = fqdn
text = True
agree-dev-preview = True
agree-tos = True
authenticator = apache
installer = apache
verbose = True

This makes everything automatic, except the following:

-------------------------------------------------------------------------------
You have an existing certificate that contains exactly the same domains you
requested (ref: /etc/letsencrypt/renewal/fqdn.conf)

Do you want to renew and replace this certificate with a newly-issued one?
-------------------------------------------------------------------------------
(R)eplace/(C)ancel: R
...
We were unable to find a vhost with a ServerName or Address of fqdn.
Which virtual host would you like to choose?
-------------------------------------------------------------------------------
1: 000-default.conf               |                       |       |
2: default-ssl.conf               |                       | HTTPS | Enabled
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
...
Please choose whether HTTPS access is required or optional.
-------------------------------------------------------------------------------
1: Easy - Allow both HTTP and HTTPS access to these sites
2: Secure - Make all requests redirect to secure HTTPS access
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

In order for me to run this in a cron job I would like this to be documented how I can pre-seed the answers. I found --replace, but documentation could be a lot clearer on how to make this all automatic.

@bmw

This comment has been minimized.

Copy link
Contributor

bmw commented Nov 19, 2015

I agree we need better documentation for how to automate everything using the command line. To answer your specific questions:

Do you want to renew and replace this certificate with a newly-issued one?

If you want to duplicate the behavior you got here, provide --duplicate, but this probably isn't what you want. This will create a new directory in /etc/letsencrypt/live/ for every run of the client. Instead, what you probably want is --renew-by-default which will just update the current directory.

Which virtual host would you like to choose?

There's actually not a way to answer this question on the command line at this time. However, if you add ServerName or ServerAlias directives to your virtual host, the Apache plugin can determine which virtual host needs to be modified and will not ask this question.

Please choose whether HTTPS access is required or optional.

Use --redirect.

@sydneyli

This comment has been minimized.

Copy link
Member

sydneyli commented Sep 19, 2018

We have a --non-interactive flag now, which is also triggered by default via renewal! See #804.

@sydneyli sydneyli closed this Sep 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.