From 0465721fcd16f7be165e04f5484a66c748fe6f53 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 14 Nov 2024 19:46:01 +0700 Subject: [PATCH] Fix sharing update --- src/executor/runnersub.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/executor/runnersub.js b/src/executor/runnersub.js index 0b0f724..0d85f15 100644 --- a/src/executor/runnersub.js +++ b/src/executor/runnersub.js @@ -244,10 +244,10 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec, if ((!expectCert || !expectKey) && !regenerateSsl) { expectedSslMode = 'off'; } - // if (force regenerate or no explicit command or ssl not match) AND it's shared, then must break. + // if (force regenerate or no explicit command or ssl not match) AND it's shared ssl differ, then must break. if (regenerateSsl || (!expectedSslMode && !sharedSSL && !selfSignSsl) || (expectCert != nginxInfos.ssl_certificate)) { - if (subdomaindata['SSL shared with'] && expectedSslMode != 'off') { - await writeLog("$> Breaking ssl cert sharing with the global domain"); + if (subdomaindata['SSL shared with'] && (!sharedSSL || subdomaindata['SSL shared with'] != sharedSSL.domain)) { + await writeLog("$> Breaking ssl cert sharing"); await virtExec("modify-web", { domain: subdomain, 'break-ssl-cert': true,