Compare commits
No commits in common. "master" and "v2.2.0" have entirely different histories.
35
README.md
35
README.md
@ -1,36 +1,5 @@
|
|||||||
# Deprecated
|
le-store-certbot
|
||||||
|
================
|
||||||
`le-store-certbot` has been replaced with [`le-store-fs`](https://git.coolaj86.com/coolaj86/le-store-fs.js).
|
|
||||||
|
|
||||||
The new storage strategy **keeps file system compatibility**, but **drops support** for Python config files.
|
|
||||||
|
|
||||||
Unless you're running `certbot` and Greenlock side-by-side, or interchangeably, you switch to `le-store-fs`.
|
|
||||||
|
|
||||||
## Migrating to `le-store-fs`
|
|
||||||
|
|
||||||
It's **painless** and all of your existing certificates will be **preserved**
|
|
||||||
(assuming you use the same `configDir` as before).
|
|
||||||
|
|
||||||
```js
|
|
||||||
Greenlock.create({
|
|
||||||
|
|
||||||
// Leave configDir as it, if you've been setting it yourself.
|
|
||||||
// Otherwise you should explicitly set it to the previous default:
|
|
||||||
configDir: '~/letsencrypt/etc'
|
|
||||||
|
|
||||||
// le-store-fs takes the same options as le-store-certbot,
|
|
||||||
// but ignores some of the ones that aren't important.
|
|
||||||
, store: require('le-store-fs').create({})
|
|
||||||
|
|
||||||
...
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
## Alternatives
|
|
||||||
|
|
||||||
* Search npm for ["le-store-"](https://www.npmjs.com/search?q=le-store-) to find many alternatives.
|
|
||||||
|
|
||||||
# le-store-certbot
|
|
||||||
|
|
||||||
The "certbot" storage strategy for
|
The "certbot" storage strategy for
|
||||||
[Greenlock.js](https://git.coolaj86.com/coolaj86/le-store-certbot.js).
|
[Greenlock.js](https://git.coolaj86.com/coolaj86/le-store-certbot.js).
|
||||||
|
|||||||
19
index.js
19
index.js
@ -8,9 +8,6 @@ try {
|
|||||||
PromiseA = Promise;
|
PromiseA = Promise;
|
||||||
}
|
}
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
if (!util.promisify) {
|
|
||||||
util.promisify = PromiseA.promisify;
|
|
||||||
}
|
|
||||||
function promisifyAll(obj) {
|
function promisifyAll(obj) {
|
||||||
var aobj = {};
|
var aobj = {};
|
||||||
Object.keys(obj).forEach(function (key) {
|
Object.keys(obj).forEach(function (key) {
|
||||||
@ -18,7 +15,7 @@ function promisifyAll(obj) {
|
|||||||
});
|
});
|
||||||
return aobj;
|
return aobj;
|
||||||
}
|
}
|
||||||
var mkdirpAsync = util.promisify(require('@root/mkdirp'));
|
var mkdirpAsync = util.promisify(require('mkdirp'));
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var readFileAsync = util.promisify(fs.readFile);
|
var readFileAsync = util.promisify(fs.readFile);
|
||||||
@ -249,8 +246,8 @@ module.exports.create = function (configs) {
|
|||||||
};
|
};
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
if (args.debug) {
|
if (args.debug) {
|
||||||
log("certificates.check");
|
console.error("[le-store-certbot] certificates.check");
|
||||||
log(err.stack);
|
console.error(err.stack);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
@ -280,17 +277,13 @@ module.exports.create = function (configs) {
|
|||||||
var bundleArchive = path.join(archiveDir, 'bundle' + checkpoints + '.pem');
|
var bundleArchive = path.join(archiveDir, 'bundle' + checkpoints + '.pem');
|
||||||
|
|
||||||
return mkdirpAsync(archiveDir).then(function () {
|
return mkdirpAsync(archiveDir).then(function () {
|
||||||
var ps = [
|
return PromiseA.all([
|
||||||
sfs.writeFileAsync(certArchive, pems.cert, 'ascii')
|
sfs.writeFileAsync(certArchive, pems.cert, 'ascii')
|
||||||
, sfs.writeFileAsync(chainArchive, pems.chain, 'ascii')
|
, sfs.writeFileAsync(chainArchive, pems.chain, 'ascii')
|
||||||
, sfs.writeFileAsync(fullchainArchive, [ pems.cert, pems.chain ].join('\n'), 'ascii')
|
, sfs.writeFileAsync(fullchainArchive, [ pems.cert, pems.chain ].join('\n'), 'ascii')
|
||||||
, sfs.writeFileAsync(privkeyArchive, pems.privkey, 'ascii')
|
, sfs.writeFileAsync(privkeyArchive, pems.privkey, 'ascii')
|
||||||
];
|
, sfs.writeFileAsync(bundleArchive, pems.bundle, 'ascii')
|
||||||
if (pems.bundle) {
|
]);
|
||||||
var bundleP = sfs.writeFileAsync(bundleArchive, pems.bundle, 'ascii');
|
|
||||||
ps.push(bundleP);
|
|
||||||
}
|
|
||||||
return PromiseA.all(ps);
|
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return mkdirpAsync(liveDir);
|
return mkdirpAsync(liveDir);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
|||||||
26
package-lock.json
generated
26
package-lock.json
generated
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "le-store-certbot",
|
|
||||||
"version": "2.2.4",
|
|
||||||
"lockfileVersion": 1,
|
|
||||||
"requires": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@root/mkdirp": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@root/mkdirp/-/mkdirp-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-hxGAYUx5029VggfG+U9naAhQkoMSXtOeXtbql97m3Hi6/sQSRL/4khKZPyOF6w11glyCOU38WCNLu9nUcSjOfA=="
|
|
||||||
},
|
|
||||||
"pyconf": {
|
|
||||||
"version": "1.1.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/pyconf/-/pyconf-1.1.7.tgz",
|
|
||||||
"integrity": "sha512-v4clh33m68sjtMsh8XMpjhGWb/MQODAYZ1y7ORG5Qv58UK25OddoB+oXyexgDkK8ttFui/lZm2sQDgA2Ftjfkw==",
|
|
||||||
"requires": {
|
|
||||||
"safe-replace": "^1.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"safe-replace": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/safe-replace/-/safe-replace-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-9/V2E0CDsKs9DWOOwJH7jYpSl9S3N05uyevNjvsnDauBqRowBPOyot1fIvV5N2IuZAbYyvrTXrYFVG0RZInfFw=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "le-store-certbot",
|
"name": "le-store-certbot",
|
||||||
"version": "2.2.4",
|
"version": "2.2.0",
|
||||||
"description": "The \"certbot\" storage strategy for Greenlock.js",
|
"description": "The \"certbot\" storage strategy for Greenlock.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bump": "npm version -m \"chore(release): bump to v%s\"",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -28,8 +27,8 @@
|
|||||||
"bluebird": "^3.5.1"
|
"bluebird": "^3.5.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@root/mkdirp": "^1.0.0",
|
"mkdirp": "^0.5.1",
|
||||||
"pyconf": "^1.1.7",
|
"pyconf": "^1.1.5",
|
||||||
"safe-replace": "^1.1.0"
|
"safe-replace": "^1.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user