letsencrypt to greenlock

This commit is contained in:
Drew Warren 2017-01-25 14:42:01 -07:00
parent 7ffd280c37
commit 9e622a2f58
3 changed files with 19 additions and 19 deletions

View File

@ -17,14 +17,14 @@ Tired of serving the Empire? Come join the Rebel Alliance:
[![Join the chat at https://gitter.im/Daplie/letsencrypt-express](https://badges.gitter.im/Daplie/letsencrypt-express.svg)](https://gitter.im/Daplie/letsencrypt-express?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the chat at https://gitter.im/Daplie/letsencrypt-express](https://badges.gitter.im/Daplie/letsencrypt-express.svg)](https://gitter.im/Daplie/letsencrypt-express?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
| [letsencrypt (library)](https://git.daplie.com/Daplie/node-greenlock) | [greenlock (library)](https://git.daplie.com/Daplie/node-greenlock)
| **letsencrypt-cli** | **greenlock-cli**
| [letsencrypt-express](https://git.daplie.com/Daplie/greenlock-express) | [greenlock-express](https://git.daplie.com/Daplie/greenlock-express)
| [letsencrypt-koa](https://git.daplie.com/Daplie/greenlock-koa) | [greenlock-koa](https://git.daplie.com/Daplie/greenlock-koa)
| [letsencrypt-hapi](https://git.daplie.com/Daplie/greenlock-hapi) | [greenlock-hapi](https://git.daplie.com/Daplie/greenlock-hapi)
| |
CLI for node-letsencrypt modeled after the official client. CLI for node-greenlock modeled after the official client.
* Free SSL Certificates * Free SSL Certificates
* 90-day certificate lifetime * 90-day certificate lifetime
@ -43,10 +43,10 @@ For Linux and **OS X**:
curl -L bit.ly/nodejs-min | bash curl -L bit.ly/nodejs-min | bash
``` ```
# Install LetsEncrypt # Install Greenlock
```bash ```bash
npm install -g letsencrypt-cli@2.x npm install -g greenlock-cli@2.x
``` ```
## Usage ## Usage
@ -67,7 +67,7 @@ http-01 challenge (the default) on port 80, or a tls-sni-01 challenge on port
443 (or 5001). Like so: 443 (or 5001). Like so:
```bash ```bash
letsencrypt certonly \ greenlock certonly \
--agree-tos --email john.doe@example.com \ --agree-tos --email john.doe@example.com \
--standalone \ --standalone \
--domains example.com,www.example.com \ --domains example.com,www.example.com \
@ -78,7 +78,7 @@ letsencrypt certonly \
or or
```bash ```bash
letsencrypt certonly \ greenlock certonly \
--agree-tos --email john.doe@example.com \ --agree-tos --email john.doe@example.com \
--standalone --tls-sni-01-port 443 \ --standalone --tls-sni-01-port 443 \
--domains example.com,www.example.com \ --domains example.com,www.example.com \
@ -105,7 +105,7 @@ For example, if I want to get a domain for `example.com` and my `index.html` is
at `/srv/www/example.com`, then I would use this command: at `/srv/www/example.com`, then I would use this command:
```bash ```bash
sudo letsencrypt certonly \ sudo greenlock certonly \
--agree-tos --email john.doe@example.com \ --agree-tos --email john.doe@example.com \
--webroot --webroot-path /srv/www/example.com \ --webroot --webroot-path /srv/www/example.com \
--config-dir /etc/letsencrypt \ --config-dir /etc/letsencrypt \
@ -138,7 +138,7 @@ it could be another server that performs SSL/TLS negotiation with SNI.
The process works something like this. You would run: The process works something like this. You would run:
```bash ```bash
sudo letsencrypt certonly \ sudo greenlock certonly \
--agree-tos --email john.doe@example.com \ --agree-tos --email john.doe@example.com \
--hooks --hooks-server apache2-debian \ --hooks --hooks-server apache2-debian \
--config-dir /etc/letsencrypt \ --config-dir /etc/letsencrypt \
@ -196,7 +196,7 @@ will be printed to the screen and you will be given time to copy it wherever
(file, dns record, database, etc) and the process will complete once you hit `enter`. (file, dns record, database, etc) and the process will complete once you hit `enter`.
```bash ```bash
sudo letsencrypt certonly \ sudo greenlock certonly \
--agree-tos --email john.doe@example.com \ --agree-tos --email john.doe@example.com \
--manual --manual
--config-dir /etc/letsencrypt \ --config-dir /etc/letsencrypt \
@ -238,7 +238,7 @@ you can use `setcap` to do so. (it may need to be run any time you reinstall nod
sudo setcap cap_net_bind_service=+ep /usr/local/bin/node sudo setcap cap_net_bind_service=+ep /usr/local/bin/node
``` ```
By default `node-letsencrypt` assumes your home directory `~/letsencrypt/`, but if By default `node-greenlock` assumes your home directory `~/letsencrypt/`, but if
you really want to use `/etc/letsencrypt`, `/var/lib/letsencrypt/`, and `/var/log/letsencrypt` you really want to use `/etc/letsencrypt`, `/var/lib/letsencrypt/`, and `/var/log/letsencrypt`
you could change the permissions on them. **Probably a BAD IDEA**. Probabry a security risk. you could change the permissions on them. **Probably a BAD IDEA**. Probabry a security risk.
@ -251,7 +251,7 @@ sudo chown -R $(whoami) /etc/letsencrypt /var/lib/letsencrypt /var/log/letsencry
``` ```
Usage: Usage:
letsencrypt [OPTIONS] [ARGS] greenlock [OPTIONS] [ARGS]
Options: Options:
--server [STRING] ACME Directory Resource URI. (Default is https://acme-v01.api.letsencrypt.org/directory)) --server [STRING] ACME Directory Resource URI. (Default is https://acme-v01.api.letsencrypt.org/directory))

View File

@ -75,8 +75,8 @@ cli.main(function(_, options) {
} }
if (!(Array.isArray(args.domains) && args.domains.length) || !args.email || !args.agreeTos) { if (!(Array.isArray(args.domains) && args.domains.length) || !args.email || !args.agreeTos) {
console.error("\nUsage: letsencrypt certonly --standalone --domains example.com --email user@example.com --agree-tos"); console.error("\nUsage: greenlock certonly --standalone --domains example.com --email user@example.com --agree-tos");
console.error("\nSee letsencrypt --help for more details\n"); console.error("\nSee greenlock --help for more details\n");
return; return;
} }

View File

@ -2,7 +2,7 @@
var DAY = 24 * 60 * 60 * 1000; var DAY = 24 * 60 * 60 * 1000;
var LE = require('letsencrypt'); var LE = require('greenlock');
module.exports.run = function (args) { module.exports.run = function (args) {
var leChallenge; var leChallenge;
@ -149,7 +149,7 @@ module.exports.run = function (args) {
process.exit(0); process.exit(0);
}, function (err) { }, function (err) {
console.error('[Error]: letsencrypt-cli'); console.error('[Error]: greenlock-cli');
console.error(err.stack || new Error('get stack').stack); console.error(err.stack || new Error('get stack').stack);
process.exit(1); process.exit(1);