diff --git a/Dockerfile b/Dockerfile index 64accf5..e51faeb 100755 --- a/Dockerfile +++ b/Dockerfile @@ -107,6 +107,7 @@ RUN \ certbot-dns-inwx \ certbot-dns-linode \ certbot-dns-luadns \ + certbot-dns-netcup \ certbot-dns-nsone \ certbot-dns-ovh \ certbot-dns-rfc2136 \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index bf47a0e..a32fee6 100755 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -107,6 +107,7 @@ RUN \ certbot-dns-inwx \ certbot-dns-linode \ certbot-dns-luadns \ + certbot-dns-netcup \ certbot-dns-nsone \ certbot-dns-ovh \ certbot-dns-rfc2136 \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index cc2bec8..9fbc5e1 100755 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -107,6 +107,7 @@ RUN \ certbot-dns-inwx \ certbot-dns-linode \ certbot-dns-luadns \ + certbot-dns-netcup \ certbot-dns-nsone \ certbot-dns-ovh \ certbot-dns-rfc2136 \ diff --git a/readme-vars.yml b/readme-vars.yml index 702c926..2360a31 100755 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -50,7 +50,7 @@ cap_add_param_vars: # optional container parameters opt_param_usage_include_env: true opt_param_env_vars: - - { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `nsone`, `ovh`, `rfc2136`, `route53` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." } + - { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `netcup`, `nsone`, `ovh`, `rfc2136`, `route53` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." } - { env_var: "PROPAGATION", env_value: "", desc: "Optionally override (in seconds) the default propagation time for the dns plugins." } - { env_var: "DUCKDNSTOKEN", env_value: "", desc: "Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org" } - { env_var: "EMAIL", env_value: "", desc: "Optional e-mail address used for cert expiration notifications." } @@ -149,6 +149,7 @@ app_setup_nginx_reverse_proxy_block: "" # changelog changelogs: + - { date: "01.11.20:", desc: "Add support for netcup dns validation" } - { date: "29.10.20:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) ssl.conf - Add frame-ancestors to Content-Security-Policy." } - { date: "04.10.20:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf, proxy.conf, and ssl.conf - Minor cleanups and reordering." } - { date: "20.09.20:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) nginx.conf - Added geoip2 configs. Added MAXMINDDB_LICENSE_KEY variable to readme."} diff --git a/root/defaults/dns-conf/netcup.ini b/root/defaults/dns-conf/netcup.ini new file mode 100644 index 0000000..a3a1e90 --- /dev/null +++ b/root/defaults/dns-conf/netcup.ini @@ -0,0 +1,3 @@ +dns_netcup_customer_id = 123456 +dns_netcup_api_key = 0123456789abcdef0123456789abcdef01234567 +dns_netcup_api_password = abcdef0123456789abcdef01234567abcdef0123 diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index bc63fcb..f1d925f 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -92,7 +92,7 @@ if ! grep -q 'PARAMETERS' "/config/nginx/dhparams.pem"; then fi # check to make sure DNSPLUGIN is selected if dns validation is used -[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|google|inwx|linode|luadns|nsone|ovh|rfc2136|route53|transip)$ ]] && \ +[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|google|inwx|linode|luadns|netcup|nsone|ovh|rfc2136|route53|transip)$ ]] && \ echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \ sleep infinity @@ -189,6 +189,9 @@ if [ "$VALIDATION" = "dns" ]; then elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|inwx|transip)$ ]]; then if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi PREFCHAL="-a certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM} --manual-public-ip-logging-ok" + elif [[ "$DNSPLUGIN" =~ ^(netcup)$ ]]; then + if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi + PREFCHAL="-a dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM} --manual-public-ip-logging-ok" else if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--dns-${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM} --manual-public-ip-logging-ok"