How can I tell certbot-auto which domain to get a certificate for?


#1

O see there is a -d option but I cannot find where to set it. certbot-auto works fine if I run it interactively.

My domain is: xml.totalflood.com

I ran this command: /etc/cron.daily/certbot-auto

It produced this output:
/etc/cron.daily/certbot-auto:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?


1: scadmzxml01.lereta.com
2: scadmzxml01.totalflood.com
3: xml.totalflood.com


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel): An unexpected error occurred:
Traceback (most recent call last):
File “/opt/eff.org/certbot/venv/bin/letsencrypt”, line 11, in
load_entry_point(‘letsencrypt==0.7.0’, ‘console_scripts’, ‘letsencrypt’)()
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/main.py”, line 1364, in main
return config.func(config, plugins)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/main.py”, line 1118, in run
domains, certname = _find_domains_or_certname(config, installer)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/main.py”, line 421, in _find_domains_or_certname
domains = display_ops.choose_names(installer, question)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/display/ops.py”, line 129, in choose_names
code, names = _filter_names(names, question)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/display/ops.py”, line 181, in _filter_names
question, tags=sorted_names, cli_flag="–domains", force_interactive=True)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/display/util.py”, line 261, in checklist
force_interactive=True)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/display/util.py”, line 185, in input
ans = input_with_timeout(message)
File “/opt/eff.org/certbot/venv/lib64/python3.4/site-packages/certbot/display/util.py”, line 90, in input_with_timeout
raise EOFError
EOFError

My web server is (include version): Apache 2.2.15

The operating system my web server runs on is (include version): CentOS 6

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no


#2

Hi @jscarville

use

/etc/cron.daily/certbot-auto -d xml.totalflood.com

if you want a certificate with one domain name xml.totalflood.com.

Or

/etc/cron.daily/certbot-auto -d xml.totalflood.com -d scadmzxml01.lereta.com

One certificate with two domain names.


#3

Thank you. I will move the script out of cron.daily and invoke with -d from a crontab.


#4

From crontab, you can use certbot renew which renews any existing certificates that are less than 30 days from expiry. It’s specifically meant to be run frequently from a crontab.


#5

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