@@ -782,15 +782,15 @@ const internalCertificate = {
782782 requestLetsEncryptSslWithDnsChallenge : ( certificate ) => {
783783 const dns_plugin = dns_plugins [ certificate . meta . dns_provider ] ;
784784
785- if ( ! dns_plugin ) {
786- throw Error ( `Unknown DNS provider '${ certificate . meta . dns_provider } '` )
785+ if ( ! dns_plugin ) {
786+ throw Error ( `Unknown DNS provider '${ certificate . meta . dns_provider } '` ) ;
787787 }
788788
789789 logger . info ( `Requesting Let'sEncrypt certificates via ${ dns_plugin . display_name } for Cert #${ certificate . id } : ${ certificate . domain_names . join ( ', ' ) } ` ) ;
790790
791- const credentials_loc = ` /etc/letsencrypt/credentials-${ certificate . id } ` ;
792- const credentials_cmd = ` echo ' ${ certificate . meta . dns_provider_credentials . replace ( "'" , "\'" ) } ' > ' ${ credentials_loc } ' && chmod 600 ' ${ credentials_loc } '` ;
793- const prepare_cmd = 'pip3 install ' + dns_plugin . package_name + '==' + dns_plugin . package_version ;
791+ const credentials_loc = ' /etc/letsencrypt/credentials-' + certificate . id ;
792+ const credentials_cmd = ' echo \'' + certificate . meta . dns_provider_credentials . replace ( '\'' , '\\\'' ) + '\' > \'' + credentials_loc + '\' && chmod 600 \'' + credentials_loc + '\'' ;
793+ const prepare_cmd = 'pip3 install ' + dns_plugin . package_name + '==' + dns_plugin . package_version ;
794794
795795 const main_cmd =
796796 certbot_command + ' certonly --non-interactive ' +
@@ -802,8 +802,8 @@ const internalCertificate = {
802802 '--' + dns_plugin . full_plugin_name + '-credentials "' + credentials_loc + '"' +
803803 (
804804 certificate . meta . propagation_seconds !== undefined
805- ? ' --' + dns_plugin . full_plugin_name + '-propagation-seconds ' + certificate . meta . propagation_seconds
806- : ''
805+ ? ' --' + dns_plugin . full_plugin_name + '-propagation-seconds ' + certificate . meta . propagation_seconds
806+ : ''
807807 ) +
808808 ( le_staging ? ' --staging' : '' ) ;
809809
@@ -904,15 +904,15 @@ const internalCertificate = {
904904 renewLetsEncryptSslWithDnsChallenge : ( certificate ) => {
905905 const dns_plugin = dns_plugins [ certificate . meta . dns_provider ] ;
906906
907- if ( ! dns_plugin ) {
908- throw Error ( `Unknown DNS provider '${ certificate . meta . dns_provider } '` )
907+ if ( ! dns_plugin ) {
908+ throw Error ( `Unknown DNS provider '${ certificate . meta . dns_provider } '` ) ;
909909 }
910910
911911 logger . info ( `Renewing Let'sEncrypt certificates via ${ dns_plugin . display_name } for Cert #${ certificate . id } : ${ certificate . domain_names . join ( ', ' ) } ` ) ;
912912
913- const credentials_loc = ` /etc/letsencrypt/credentials-${ certificate . id } ` ;
914- const credentials_cmd = ` echo ' ${ certificate . meta . dns_provider_credentials . replace ( "'" , "\'" ) } ' > ' ${ credentials_loc } ' && chmod 600 ' ${ credentials_loc } '` ;
915- const prepare_cmd = 'pip3 install ' + dns_plugin . package_name + '==' + dns_plugin . package_version ;
913+ const credentials_loc = ' /etc/letsencrypt/credentials-' + certificate . id ;
914+ const credentials_cmd = ' echo \'' + certificate . meta . dns_provider_credentials . replace ( '\'' , '\\\'' ) + '\' > \'' + credentials_loc + '\' && chmod 600 \'' + credentials_loc + '\'' ;
915+ const prepare_cmd = 'pip3 install ' + dns_plugin . package_name + '==' + dns_plugin . package_version ;
916916
917917 const main_cmd =
918918 certbot_command + ' renew --non-interactive ' +
0 commit comments