mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Merge pull request #585 from kuba/xdg-user-dirs
Example dev config file, config file docs, $XDG_CONFIG_HOME.
This commit is contained in:
commit
d9d620180b
3 changed files with 45 additions and 1 deletions
|
|
@ -151,6 +151,27 @@ The ``letsencrypt`` commandline tool has a builtin help:
|
|||
./venv/bin/letsencrypt --help
|
||||
|
||||
|
||||
Configuration file
|
||||
------------------
|
||||
|
||||
It is possible to specify configuration file with
|
||||
``letsencrypt --config cli.ini`` (or shorter ``-c cli.ini``). For
|
||||
instance, if you are a contributor, you might find the following
|
||||
handy:
|
||||
|
||||
.. include:: ../examples/dev-cli.ini
|
||||
:code: ini
|
||||
|
||||
By default, the following locations are searched:
|
||||
|
||||
- ``/etc/letsencrypt/cli.ini``
|
||||
- ``$XDG_CONFIG_HOME/letsencrypt/cli.ini`` (or
|
||||
``~/.config/letsencrypt/cli.ini`` if ``$XDG_CONFIG_HOME`` is not
|
||||
set).
|
||||
|
||||
.. keep it up to date with constants.py
|
||||
|
||||
|
||||
.. _Augeas: http://augeas.net/
|
||||
.. _M2Crypto: https://github.com/M2Crypto/M2Crypto
|
||||
.. _SWIG: http://www.swig.org/
|
||||
|
|
|
|||
17
examples/dev-cli.ini
Normal file
17
examples/dev-cli.ini
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# This is an example configuration file for developers
|
||||
config-dir = /tmp/le/conf
|
||||
work-dir = /tmp/le/conf
|
||||
logs-dir = /tmp/le/logs
|
||||
|
||||
# make sure to use a valid email and domains!
|
||||
email = foo@example.com
|
||||
domains = example.com
|
||||
|
||||
text = True
|
||||
agree-eula = True
|
||||
debug = True
|
||||
# Unfortunately, it's not possible to specify "verbose" multiple times
|
||||
# (correspondingly to -vvvvvv)
|
||||
verbose = True
|
||||
|
||||
authenticator = standalone
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
"""Let's Encrypt constants."""
|
||||
import os
|
||||
import logging
|
||||
|
||||
from acme import challenges
|
||||
|
|
@ -8,7 +9,12 @@ SETUPTOOLS_PLUGINS_ENTRY_POINT = "letsencrypt.plugins"
|
|||
"""Setuptools entry point group name for plugins."""
|
||||
|
||||
CLI_DEFAULTS = dict(
|
||||
config_files=["/etc/letsencrypt/cli.ini"],
|
||||
config_files=[
|
||||
"/etc/letsencrypt/cli.ini",
|
||||
# http://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||
os.path.join(os.environ.get("XDG_CONFIG_HOME", "~/.config"),
|
||||
"letsencrypt", "cli.ini"),
|
||||
],
|
||||
verbose_count=-(logging.WARNING / 10),
|
||||
server="https://www.letsencrypt-demo.org/acme/new-reg",
|
||||
rsa_key_size=2048,
|
||||
|
|
|
|||
Loading…
Reference in a new issue