@@ -782,15 +782,15 @@ const internalCertificate = {
782
782
requestLetsEncryptSslWithDnsChallenge : ( certificate ) => {
783
783
const dns_plugin = dns_plugins [ certificate . meta . dns_provider ] ;
784
784
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 } '` ) ;
787
787
}
788
788
789
789
logger . info ( `Requesting Let'sEncrypt certificates via ${ dns_plugin . display_name } for Cert #${ certificate . id } : ${ certificate . domain_names . join ( ', ' ) } ` ) ;
790
790
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 ;
794
794
795
795
const main_cmd =
796
796
certbot_command + ' certonly --non-interactive ' +
@@ -802,8 +802,8 @@ const internalCertificate = {
802
802
'--' + dns_plugin . full_plugin_name + '-credentials "' + credentials_loc + '"' +
803
803
(
804
804
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
+ : ''
807
807
) +
808
808
( le_staging ? ' --staging' : '' ) ;
809
809
@@ -904,15 +904,15 @@ const internalCertificate = {
904
904
renewLetsEncryptSslWithDnsChallenge : ( certificate ) => {
905
905
const dns_plugin = dns_plugins [ certificate . meta . dns_provider ] ;
906
906
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 } '` ) ;
909
909
}
910
910
911
911
logger . info ( `Renewing Let'sEncrypt certificates via ${ dns_plugin . display_name } for Cert #${ certificate . id } : ${ certificate . domain_names . join ( ', ' ) } ` ) ;
912
912
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 ;
916
916
917
917
const main_cmd =
918
918
certbot_command + ' renew --non-interactive ' +
0 commit comments