|
|
@ -9,16 +9,18 @@ apiuser=${ACMEDNS_API_USER:-''} |
|
|
apikey=${ACMEDNS_API_KEY:-''} |
|
|
apikey=${ACMEDNS_API_KEY:-''} |
|
|
apisubdomain=${ACMEDNS_SUBDOMAIN:-''} |
|
|
apisubdomain=${ACMEDNS_SUBDOMAIN:-''} |
|
|
|
|
|
|
|
|
# This script adds a token to acme-dns.io DNS for the ACME challenge |
|
|
|
|
|
# usage dns_add_acme-dns "domain name" "token" |
|
|
|
|
|
# return codes are; |
|
|
|
|
|
|
|
|
# This script adds a token to an ACME DNS (default to acme-dns.io) for the ACME challenge |
|
|
|
|
|
# usage: dns_add_acme-dns "domain name" "token" |
|
|
|
|
|
# return codes are: |
|
|
# 0 - success |
|
|
# 0 - success |
|
|
# 1 - error returned from server |
|
|
# 1 - error returned from server |
|
|
|
|
|
|
|
|
fulldomain="${1}" |
|
|
fulldomain="${1}" |
|
|
token="${2}" |
|
|
token="${2}" |
|
|
|
|
|
|
|
|
API='https://auth.acme-dns.io/update' |
|
|
|
|
|
|
|
|
# You can set the env var ACMEDNS_URL to use a specific ACME-DNS server |
|
|
|
|
|
# Otherwise we use acme-dns.io |
|
|
|
|
|
API=${ACMEDNS_URL:-'https://auth.acme-dns.io'}/update |
|
|
|
|
|
|
|
|
# Check initial parameters |
|
|
# Check initial parameters |
|
|
if [[ -z "$fulldomain" ]]; then |
|
|
if [[ -z "$fulldomain" ]]; then |
|
|
|