Robin Thoni 6e0bd75be1 setup.py | 7 years ago | |
---|---|---|
.idea | 8 years ago | |
extra | 7 years ago | |
sitegencli | 7 years ago | |
tests | 7 years ago | |
.gitignore | 7 years ago | |
README.md | 7 years ago | |
TODO | 8 years ago | |
install | 8 years ago | |
requirements.txt | 8 years ago | |
setup.cfg | 7 years ago | |
setup.py | 7 years ago |
CLI tool to build web site configuration and obtain SSL certificates from letsencrypt using certbot.
Also provide a simpler way to request SSL certificate over certbot.
#Install from pip
pip2 install sitegencli
#Install from sources
python2 setup.py install
Configuration must be copied from /usr/local/etc/sitegen
to /etc/sitegen
:
sitegen.json looks like:
{
"siteConfDir": "/etc/apache2/sites-available/",
"siteDir": "/var/",
"confDir": "/etc/sitegen/",
"certRenewTime": 5356800,
"letsencryptCommands": [
{
"patterns": [
"example.com",
"*.example.com"
],
"command": {
"letsencryptCommand": "certbot",
"letsencryptArgs": [
"--agree-tos",
"--text",
"--renew-by-default",
"--webroot",
"--webroot-path",
"/tmp/acme-challenge/",
"certonly"
]
}
},
{
"patterns": "*",
"command": {
"letsencryptCommand": "certbot",
"letsencryptArgs": [
"--agree-tos",
"--text",
"--renew-by-default",
"--authenticator",
"certbot-pdns:auth",
"certonly"
]
}
}
],
"letsencryptDir": "/etc/letsencrypt/live/",
"certDir": "/etc/ssl/private/"
}
Configuration keys:
Generate a site with SSL:
sitegen --site-create example.com:default.https
Request a SSL certificate:
sitegen --cert-request example.com
See sitegen --help
for more.