2016-06-18 13:42:49 +00:00
|
|
|
"use strict";
|
2016-06-22 11:22:09 +00:00
|
|
|
var plugins = require("./cert.plugins");
|
|
|
|
var paths = require("./cert.paths");
|
|
|
|
exports.startInstall = function () {
|
|
|
|
var done = plugins.q.defer();
|
|
|
|
plugins.beautylog.info("installing letsencrypt.sh locally...");
|
|
|
|
plugins.fs.ensureDir(plugins.path.join(__dirname, "assets/"));
|
|
|
|
plugins.smartfile.remote.toFs("https://raw.githubusercontent.com/lukas2511/letsencrypt.sh/master/letsencrypt.sh", paths.letsencryptSh).then(function () {
|
|
|
|
plugins.beautylog.success("Done!");
|
|
|
|
done.resolve();
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
var smartcli = new plugins.smartcli.Smartcli();
|
|
|
|
smartcli.addCommand({
|
|
|
|
commandName: "install"
|
|
|
|
}).then(exports.startInstall);
|
|
|
|
smartcli.startParse();
|
2016-06-18 13:07:54 +00:00
|
|
|
|
2016-06-22 11:22:09 +00:00
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc3RhbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQVksT0FBTyxXQUFNLGdCQUFnQixDQUFDLENBQUE7QUFDMUMsSUFBWSxLQUFLLFdBQU0sY0FBYyxDQUFDLENBQUE7QUFFM0Isb0JBQVksR0FBRztJQUN0QixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQzdCLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLHNDQUFzQyxDQUFDLENBQUM7SUFFL0QsT0FBTyxDQUFDLEVBQUUsQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLFNBQVMsQ0FBQyxDQUFDLENBQUM7SUFDOUQsT0FBTy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