Merge pull request #1042 from hepelayo/duckdnsCertbotPlugin

Add DuckDNS certbot plugin
This commit is contained in:
jc21 2021-04-29 21:37:58 +10:00 committed by GitHub
commit 5b15249689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -808,7 +808,7 @@ const internalCertificate = {
const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version + ' ' + dns_plugin.dependencies; const prepare_cmd = 'pip3 install ' + dns_plugin.package_name + '==' + dns_plugin.package_version + ' ' + dns_plugin.dependencies;
// Whether the plugin has a --<name>-credentials argument // Whether the plugin has a --<name>-credentials argument
const has_config_arg = certificate.meta.dns_provider !== 'route53'; const has_config_arg = certificate.meta.dns_provider !== 'route53' && certificate.meta.dns_provider !== 'duckdns';
let main_cmd = let main_cmd =
certbot_command + ' certonly --non-interactive ' + certbot_command + ' certonly --non-interactive ' +
@ -834,6 +834,10 @@ const internalCertificate = {
main_cmd = 'AWS_CONFIG_FILE=\'' + credentials_loc + '\' ' + main_cmd; main_cmd = 'AWS_CONFIG_FILE=\'' + credentials_loc + '\' ' + main_cmd;
} }
if (certificate.meta.dns_provider === 'duckdns') {
main_cmd = main_cmd + ' --' + dns_plugin.full_plugin_name + '-token ' + certificate.meta.dns_provider_credentials;
}
if (debug_mode) { if (debug_mode) {
logger.info('Command:', `${credentials_cmd} && ${prepare_cmd} && ${main_cmd}`); logger.info('Command:', `${credentials_cmd} && ${prepare_cmd} && ${main_cmd}`);
} }

View File

@ -322,4 +322,13 @@ certbot_dns_transip:dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`,
certbot_dns_acmedns:dns_acmedns_registration_file = /data/acme-registration.json`, certbot_dns_acmedns:dns_acmedns_registration_file = /data/acme-registration.json`,
full_plugin_name: 'certbot-dns-acmedns:dns-acmedns', full_plugin_name: 'certbot-dns-acmedns:dns-acmedns',
}, },
//####################################################//
duckdns: {
display_name: 'DuckDNS',
package_name: 'certbot-dns-duckdns',
package_version: '0.5',
dependencies: '',
credentials: '<DUCKDNS_TOKEN>',
full_plugin_name: 'certbot-dns-duckdns:dns-duckdns',
},
}; };