From fd30cfe98bba365e9630a791bdc86f01c08c6fa1 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Tue, 15 Nov 2022 07:54:48 +1000 Subject: [PATCH] Fix linting --- backend/internal/certificate.js | 2 +- backend/setup.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js index c0b3c85..d6b72f5 100644 --- a/backend/internal/certificate.js +++ b/backend/internal/certificate.js @@ -874,7 +874,7 @@ const internalCertificate = { // Escape single quotes and backslashes const escapedCredentials = certificate.meta.dns_provider_credentials.replaceAll('\'', '\\\'').replaceAll('\\', '\\\\'); const credentialsCmd = 'mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo \'' + escapedCredentials + '\' > \'' + credentialsLocation + '\' && chmod 600 \'' + credentialsLocation + '\''; - let prepareCmd = 'pip install ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies; + let prepareCmd = 'pip install ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies; // Special case for cloudflare if (dns_plugin.package_name === 'certbot-dns-cloudflare') { diff --git a/backend/setup.js b/backend/setup.js index 225a2f8..239c8c0 100644 --- a/backend/setup.js +++ b/backend/setup.js @@ -169,13 +169,14 @@ const setupCertbotPlugins = () => { .andWhere('provider', 'letsencrypt') .then((certificates) => { if (certificates && certificates.length) { - let plugins = []; - let promises = []; + let plugins = []; + let promises = []; let install_cloudflare_plugin = false; certificates.map(function (certificate) { if (certificate.meta && certificate.meta.dns_challenge === true) { - const dns_plugin = dns_plugins[certificate.meta.dns_provider]; + const dns_plugin = dns_plugins[certificate.meta.dns_provider]; + if (dns_plugin.package_name === 'certbot-dns-cloudflare') { install_cloudflare_plugin = true; } else {