소스 검색

Prevent installing same plugin over and over

Jamie Curnow 1 년 전
부모
커밋
0353051436
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      backend/setup.js

+ 3 - 1
backend/setup.js

@@ -115,7 +115,9 @@ const setupCertbotPlugins = () => {
 
 				certificates.map(function (certificate) {
 					if (certificate.meta && certificate.meta.dns_challenge === true) {
-						plugins.push(certificate.meta.dns_provider);
+						if (plugins.indexOf(certificate.meta.dns_provider) === -1) {
+							plugins.push(certificate.meta.dns_provider);
+						}
 
 						// Make sure credentials file exists
 						const credentials_loc = '/etc/letsencrypt/credentials/credentials-' + certificate.id;