mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed CR end-of-line certificate loading.
This commit is contained in:
parent
53d1e105ec
commit
b514efaaf1
5 changed files with 33 additions and 20 deletions
|
@ -16,8 +16,16 @@
|
|||
|
||||
module.exports.CreateLetsEncrypt = function (parent) {
|
||||
try {
|
||||
const greenlock = require('greenlock');
|
||||
// Try to delete the "./ursa-optional" or "./node_modules/ursa-optional" folder if present.
|
||||
// This is an optional module that GreenLock uses that causes issues.
|
||||
try {
|
||||
const fs = require('fs');
|
||||
if (fs.existsSync(obj.path.join(__dirname, 'ursa-optional'))) { fs.unlinkSync(obj.path.join(__dirname, 'ursa-optional')); }
|
||||
if (fs.existsSync(obj.path.join(__dirname, 'node_modules', 'ursa-optional'))) { fs.unlinkSync(obj.path.join(__dirname, 'node_modules', 'ursa-optional')); }
|
||||
} catch (ex) { }
|
||||
|
||||
// Get GreenLock setup and running.
|
||||
const greenlock = require('greenlock');
|
||||
var obj = {};
|
||||
obj.parent = parent;
|
||||
obj.redirWebServerHooked = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue