add certbot-dns-namecheap support
This commit is contained in:
parent
d675686e17
commit
6dbe12afca
@ -121,6 +121,7 @@ RUN \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
git+https://github.com/kylewlacy/certbot_dns_namecheap.git@wip/python3-v3 \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
|
||||
@ -121,6 +121,7 @@ RUN \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
git+https://github.com/kylewlacy/certbot_dns_namecheap.git@wip/python3-v3 \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
|
||||
@ -121,6 +121,7 @@ RUN \
|
||||
certbot-dns-transip \
|
||||
certbot-dns-vultr \
|
||||
certbot-plugin-gandi \
|
||||
git+https://github.com/kylewlacy/certbot_dns_namecheap.git@wip/python3-v3 \
|
||||
cryptography \
|
||||
requests && \
|
||||
echo "**** remove unnecessary fail2ban filters ****" && \
|
||||
|
||||
@ -51,7 +51,7 @@ cap_add_param_vars:
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "CERTPROVIDER", env_value: "", desc: "Optionally define the cert provider. Set to `zerossl` for ZeroSSL certs (requires existing [ZeroSSL account](https://app.zerossl.com/signup) and the e-mail address entered in `EMAIL` env var). Otherwise defaults to Let's Encrypt." }
|
||||
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `linode`, `luadns`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. 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`, `directadmin`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `gehirn`, `google`, `hetzner`, `inwx`, `linode`, `luadns`, `namecheap`, `netcup`, `njalla`, `nsone`, `ovh`, `rfc2136`, `route53`, `sakuracloud`, `transip` and `vultr`. 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 (Required for ZeroSSL)." }
|
||||
@ -151,6 +151,7 @@ app_setup_nginx_reverse_proxy_block: ""
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "13.04.21:", desc: "Add support for namecheap dns validation." }
|
||||
- { date: "12.04.21:", desc: "Add php7-gmp and php7-pecl-mailparse." }
|
||||
- { date: "12.04.21:", desc: "Add support for vultr dns validation." }
|
||||
- { date: "14.03.21:", desc: "Add support for directadmin dns validation." }
|
||||
|
||||
2
root/defaults/dns-conf/namecheap.ini
Normal file
2
root/defaults/dns-conf/namecheap.ini
Normal file
@ -0,0 +1,2 @@
|
||||
certbot_dns_namecheap:dns_namecheap_username=my-username
|
||||
certbot_dns_namecheap:dns_namecheap_api_key=my-api-key
|
||||
@ -99,7 +99,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|directadmin|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|inwx|linode|luadns|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip|vultr)$ ]] && \
|
||||
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|directadmin|dnsimple|dnsmadeeasy|domeneshop|gandi|gehirn|google|hetzner|inwx|linode|luadns|namecheap|netcup|njalla|nsone|ovh|rfc2136|route53|sakuracloud|transip|vultr)$ ]] && \
|
||||
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
|
||||
sleep infinity
|
||||
|
||||
@ -207,6 +207,9 @@ if [ "$VALIDATION" = "dns" ]; then
|
||||
elif [[ "$DNSPLUGIN" =~ ^(cpanel)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a certbot-dns-${DNSPLUGIN}:${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(namecheap)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then PROPAGATIONPARAM="--certbot-dns-${DNSPLUGIN}:${DNSPLUGIN}-propagation-seconds ${PROPAGATION}"; fi
|
||||
PREFCHAL="-a certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini ${PROPAGATIONPARAM}"
|
||||
elif [[ "$DNSPLUGIN" =~ ^(gandi)$ ]]; then
|
||||
if [ -n "$PROPAGATION" ];then echo "Gandi dns plugin does not support setting propagation time"; fi
|
||||
PREFCHAL="-a certbot-plugin-${DNSPLUGIN}:dns --certbot-plugin-${DNSPLUGIN}:dns-credentials /config/dns-conf/${DNSPLUGIN}.ini"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user