Skip to content

Commit cf4d1f7

Browse files
committedNov 6, 2021
Uses letsencrypt config file everywhere
1 parent d95cd36 commit cf4d1f7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎backend/internal/certificate.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ const internalCertificate = {
832832
requestLetsEncryptSsl: (certificate) => {
833833
logger.info('Requesting Let\'sEncrypt certificates for Cert #' + certificate.id + ': ' + certificate.domain_names.join(', '));
834834

835-
const cmd = certbotCommand + ' certonly --non-interactive ' +
835+
const cmd = certbotCommand + ' certonly ' +
836836
'--config "' + letsencryptConfig + '" ' +
837837
'--cert-name "npm-' + certificate.id + '" ' +
838838
'--agree-tos ' +
@@ -874,7 +874,8 @@ const internalCertificate = {
874874
// Whether the plugin has a --<name>-credentials argument
875875
const hasConfigArg = certificate.meta.dns_provider !== 'route53';
876876

877-
let mainCmd = certbotCommand + ' certonly --non-interactive ' +
877+
let mainCmd = certbotCommand + ' certonly ' +
878+
'--config "' + letsencryptConfig + '" ' +
878879
'--cert-name "npm-' + certificate.id + '" ' +
879880
'--agree-tos ' +
880881
'--email "' + certificate.meta.letsencrypt_email + '" ' +
@@ -969,7 +970,7 @@ const internalCertificate = {
969970
renewLetsEncryptSsl: (certificate) => {
970971
logger.info('Renewing Let\'sEncrypt certificates for Cert #' + certificate.id + ': ' + certificate.domain_names.join(', '));
971972

972-
const cmd = certbotCommand + ' renew --force-renewal --non-interactive ' +
973+
const cmd = certbotCommand + ' renew --force-renewal ' +
973974
'--config "' + letsencryptConfig + '" ' +
974975
'--cert-name "npm-' + certificate.id + '" ' +
975976
'--preferred-challenges "dns,http" ' +
@@ -998,7 +999,8 @@ const internalCertificate = {
998999

9991000
logger.info(`Renewing Let'sEncrypt certificates via ${dns_plugin.display_name} for Cert #${certificate.id}: ${certificate.domain_names.join(', ')}`);
10001001

1001-
let mainCmd = certbotCommand + ' renew --non-interactive ' +
1002+
let mainCmd = certbotCommand + ' renew ' +
1003+
'--config "' + letsencryptConfig + '" ' +
10021004
'--cert-name "npm-' + certificate.id + '" ' +
10031005
'--disable-hook-validation' +
10041006
(letsencryptStaging ? ' --staging' : '');
@@ -1026,7 +1028,8 @@ const internalCertificate = {
10261028
revokeLetsEncryptSsl: (certificate, throw_errors) => {
10271029
logger.info('Revoking Let\'sEncrypt certificates for Cert #' + certificate.id + ': ' + certificate.domain_names.join(', '));
10281030

1029-
const mainCmd = certbotCommand + ' revoke --non-interactive ' +
1031+
const mainCmd = certbotCommand + ' revoke ' +
1032+
'--config "' + letsencryptConfig + '" ' +
10301033
'--cert-path "/etc/letsencrypt/live/npm-' + certificate.id + '/fullchain.pem" ' +
10311034
'--delete-after-revoke ' +
10321035
(letsencryptStaging ? '--staging' : '');

0 commit comments

Comments
 (0)