Provide an option for LE cert dir (fixes #156)

This commit is contained in:
MattIPv4
2020-06-21 15:52:07 +01:00
parent 0f4c53b5ac
commit 97ccb98ef8
4 changed files with 25 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ THE SOFTWARE.
export const getSslCertificate = (domain, global) => {
if (domain.https.certType.computed === 'letsEncrypt')
`/etc/letsencrypt/live/${domain.server.domain.computed}/fullchain.pem`;
return `${global.https.letsEncryptCertRoot.computed.replace(/\/+$/, '')}/${domain.server.domain.computed}/fullchain.pem`;
if (domain.https.sslCertificate.computed)
return domain.https.sslCertificate.computed;
@@ -36,7 +36,7 @@ export const getSslCertificate = (domain, global) => {
export const getSslCertificateKey = (domain, global) => {
if (domain.https.certType.computed === 'letsEncrypt')
`/etc/letsencrypt/live/${domain.server.domain.computed}/privkey.pem`;
return `${global.https.letsEncryptCertRoot.computed.replace(/\/+$/, '')}/${domain.server.domain.computed}/privkey.pem`;
if (domain.https.sslCertificateKey.computed)
return domain.https.sslCertificateKey.computed;