From 9de23713cafb05041ddb6c07aaffde05814fe8a8 Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sat, 31 Oct 2020 22:51:15 +0100 Subject: [PATCH 1/9] add netcup dns plugin --- Dockerfile | 1 + Dockerfile.aarch64 | 1 + Dockerfile.armhf | 1 + 3 files changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 64accf5..d9e1275 100755 --- a/Dockerfile +++ b/Dockerfile @@ -112,6 +112,7 @@ RUN \ certbot-dns-rfc2136 \ certbot-dns-route53 \ certbot-dns-transip \ + certbot-dns-netcup \ certbot-plugin-gandi \ cryptography \ requests && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index bf47a0e..f46a3f9 100755 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -112,6 +112,7 @@ RUN \ certbot-dns-rfc2136 \ certbot-dns-route53 \ certbot-dns-transip \ + certbot-dns-netcup \ certbot-plugin-gandi \ cryptography \ requests && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index cc2bec8..46e43b9 100755 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -112,6 +112,7 @@ RUN \ certbot-dns-rfc2136 \ certbot-dns-route53 \ certbot-dns-transip \ + certbot-dns-netcup \ certbot-plugin-gandi \ cryptography \ requests && \ From 35fa03e01c6969385860331bc7be60954d0ef46e Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sat, 31 Oct 2020 23:20:53 +0100 Subject: [PATCH 2/9] add netcup as a valid dns validation method --- root/etc/cont-init.d/50-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index bc63fcb..72eb9ed 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|nsone|ovh|rfc2136|route53|transip|netcup|dns-netcup)$ ]] && \ echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \ sleep infinity From a910da2633018a93b1524bb35a5c8d2a48feadad Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sat, 31 Oct 2020 23:41:13 +0100 Subject: [PATCH 3/9] configure parameters for netcup correctly --- root/etc/cont-init.d/50-config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 72eb9ed..e73d103 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -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|dns-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" From 4d9439c899107b7b22a30430638ae2c44046dcb0 Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sat, 31 Oct 2020 23:54:11 +0100 Subject: [PATCH 4/9] add sample netcup.ini file --- root/defaults/dns-conf/netcup.ini | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 root/defaults/dns-conf/netcup.ini 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 From 71734a4e492971b8d514b285a641ef878eb7f31d Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sat, 31 Oct 2020 23:58:45 +0100 Subject: [PATCH 5/9] reduce to just netcup as option --- root/etc/cont-init.d/50-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index e73d103..466810f 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|netcup|dns-netcup)$ ]] && \ +[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|google|inwx|linode|luadns|nsone|ovh|rfc2136|route53|transip|netcup)$ ]] && \ echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \ sleep infinity @@ -189,7 +189,7 @@ 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|dns-netcup)$ ]]; then + 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 From 812f2d3df5045c3efb629d8d87ba01900c751321 Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sun, 1 Nov 2020 00:20:11 +0100 Subject: [PATCH 6/9] add netcup as additional dns provider in readme --- readme-vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme-vars.yml b/readme-vars.yml index 702c926..621eb31 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." } From f23595d0b92ce6c5020a256fd56ef98486ca88f5 Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sun, 1 Nov 2020 00:22:39 +0100 Subject: [PATCH 7/9] reorder netcup plugin to sort plugin list alphabetically --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9e1275..e51faeb 100755 --- a/Dockerfile +++ b/Dockerfile @@ -107,12 +107,12 @@ RUN \ certbot-dns-inwx \ certbot-dns-linode \ certbot-dns-luadns \ + certbot-dns-netcup \ certbot-dns-nsone \ certbot-dns-ovh \ certbot-dns-rfc2136 \ certbot-dns-route53 \ certbot-dns-transip \ - certbot-dns-netcup \ certbot-plugin-gandi \ cryptography \ requests && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index f46a3f9..a32fee6 100755 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -107,12 +107,12 @@ RUN \ certbot-dns-inwx \ certbot-dns-linode \ certbot-dns-luadns \ + certbot-dns-netcup \ certbot-dns-nsone \ certbot-dns-ovh \ certbot-dns-rfc2136 \ certbot-dns-route53 \ certbot-dns-transip \ - certbot-dns-netcup \ certbot-plugin-gandi \ cryptography \ requests && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 46e43b9..9fbc5e1 100755 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -107,12 +107,12 @@ RUN \ certbot-dns-inwx \ certbot-dns-linode \ certbot-dns-luadns \ + certbot-dns-netcup \ certbot-dns-nsone \ certbot-dns-ovh \ certbot-dns-rfc2136 \ certbot-dns-route53 \ certbot-dns-transip \ - certbot-dns-netcup \ certbot-plugin-gandi \ cryptography \ requests && \ From 046fb5447ab940b96dcc64adf935760ab134339c Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sun, 1 Nov 2020 09:22:58 +0100 Subject: [PATCH 8/9] put netcup in correct order within DNSPLUGIN validation --- root/etc/cont-init.d/50-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 466810f..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|netcup)$ ]] && \ +[[ "$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 From 515addf76e745fb621332357a6ead82597e46256 Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Sun, 1 Nov 2020 13:40:09 +0100 Subject: [PATCH 9/9] add changelog entry for supporting netcup --- readme-vars.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/readme-vars.yml b/readme-vars.yml index 621eb31..2360a31 100755 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -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."}