From f3ed763148847ecc449d3f4231563f4837a16fce Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 7 Jul 2021 15:30:07 +0300 Subject: [PATCH] JE-58852 [Let's Encrypt][WebRoot] Unable to install for BL+CP when used settings-custom --- scripts/ssl-manager.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/ssl-manager.js b/scripts/ssl-manager.js index 490e09af..d93d99e7 100644 --- a/scripts/ssl-manager.js +++ b/scripts/ssl-manager.js @@ -621,8 +621,16 @@ function SSLManager(config) { propName, resp; - resp = me.cmd("[[ -f \"" + CUSTOM_CONFIG + "\" ]] && echo true || echo false", { nodeGroup: config.nodeGroup }); - if (resp.result != 0) return resp; + function readConfig(group) { + return me.cmd("[[ -f \"" + CUSTOM_CONFIG + "\" ]] && echo true || echo false", { nodeGroup: group }); + } + + resp = readConfig(config.nodeGroup); + + if (resp.result == Response.FILE_PATH_NOT_EXIST) { + resp = readConfig(BL); + } + if (resp.result != (0 || Response.FILE_PATH_NOT_EXIST)) return resp; if (resp.responses[0].out == "true") { resp = nodeManager.readFile(CUSTOM_CONFIG, config.nodeGroup);