3 # Official Let's Encrypt API for do.de / Domain-Offensive
5 # This is different from the dns_do adapter, because dns_do is only usable for enterprise customers
6 # This API is also available to private customers/individuals
8 # Provide the required LetsEncrypt token like this:
9 # DO_LETOKEN="FmD408PdqT1E269gUK57"
11 DO_API
="https://www.do.de/api/letsencrypt"
13 ######## Public functions #####################
15 #Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
20 DO_LETOKEN
="${DO_LETOKEN:-$(_readaccountconf_mutable DO_LETOKEN)}"
21 if [ -z "$DO_LETOKEN" ]; then
23 _err
"You didn't configure a do.de API token yet."
24 _err
"Please set DO_LETOKEN and try again."
27 _saveaccountconf_mutable DO_LETOKEN
"$DO_LETOKEN"
29 _info
"Adding TXT record to ${fulldomain}"
30 response
="$(_get "$DO_API?token
=$DO_LETOKEN&domain
=${fulldomain}&value
=${txtvalue}")"
31 if _contains
"${response}" 'success'; then
34 _err
"Could not create resource record, check logs"
42 DO_LETOKEN
="${DO_LETOKEN:-$(_readaccountconf_mutable DO_LETOKEN)}"
43 if [ -z "$DO_LETOKEN" ]; then
45 _err
"You didn't configure a do.de API token yet."
46 _err
"Please set DO_LETOKEN and try again."
49 _saveaccountconf_mutable DO_LETOKEN
"$DO_LETOKEN"
51 _info
"Deleting resource record $fulldomain"
52 response
="$(_get "$DO_API?token
=$DO_LETOKEN&domain
=${fulldomain}&action
=delete
")"
53 if _contains
"${response}" 'success'; then
56 _err
"Could not delete resource record, check logs"