Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
94922f2d
Unverified
Commit
94922f2d
authored
Jan 25, 2019
by
neil
Committed by
GitHub
Jan 25, 2019
Browse files
Merge pull request #2053 from Manawyrm/dev
Added dns_doapi.sh
parents
8dacd51a
75fe022f
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
94922f2d
...
@@ -350,6 +350,7 @@ You don't have to do anything manually!
...
@@ -350,6 +350,7 @@ You don't have to do anything manually!
1.
Exoscale.com API (https://www.exoscale.com/)
1.
Exoscale.com API (https://www.exoscale.com/)
1.
PointDNS API (https://pointhq.com/)
1.
PointDNS API (https://pointhq.com/)
1.
Active24.cz API (https://www.active24.cz/)
1.
Active24.cz API (https://www.active24.cz/)
1.
do.de API (https://www.do.de/)
And:
And:
...
...
dnsapi/README.md
View file @
94922f2d
...
@@ -1156,6 +1156,21 @@ acme.sh --issue --dns dns_active24 -d example.com -d www.example.com --dnssleep
...
@@ -1156,6 +1156,21 @@ acme.sh --issue --dns dns_active24 -d example.com -d www.example.com --dnssleep
The `ACTIVE24_Token` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
The `ACTIVE24_Token` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
## 60. Use do.de API
Create an API token in your do.de account.
Set your API token:
```
export DO_LETOKEN='FmD408PdqT1E269gUK57'
```
To issue a certificate run:
```
acme.sh --issue --dns dns_doapi -d example.com -d
*
.example.com
```
The API token will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
# Use custom API
# Use custom API
...
...
dnsapi/dns_doapi.sh
0 → 100755
View file @
94922f2d
#!/usr/bin/env sh
# Official Let's Encrypt API for do.de / Domain-Offensive
#
# This is different from the dns_do adapter, because dns_do is only usable for enterprise customers
# This API is also available to private customers/individuals
#
# Provide the required LetsEncrypt token like this:
# DO_LETOKEN="FmD408PdqT1E269gUK57"
DO_API
=
"https://www.do.de/api/letsencrypt"
######## Public functions #####################
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_doapi_add
()
{
fulldomain
=
$1
txtvalue
=
$2
DO_LETOKEN
=
"
${
DO_LETOKEN
:-
$(
_readaccountconf_mutable DO_LETOKEN
)
}
"
if
[
-z
"
$DO_LETOKEN
"
]
;
then
DO_LETOKEN
=
""
_err
"You didn't configure a do.de API token yet."
_err
"Please set DO_LETOKEN and try again."
return
1
fi
_saveaccountconf_mutable DO_LETOKEN
"
$DO_LETOKEN
"
_info
"Adding TXT record to
${
fulldomain
}
"
response
=
"
$(
_get
"
$DO_API
?token=
$DO_LETOKEN
&domain=
${
fulldomain
}
&value=
${
txtvalue
}
"
)
"
if
_contains
"
${
response
}
"
'success'
;
then
return
0
fi
_err
"Could not create resource record, check logs"
_err
"
${
response
}
"
return
1
}
dns_doapi_rm
()
{
fulldomain
=
$1
DO_LETOKEN
=
"
${
DO_LETOKEN
:-
$(
_readaccountconf_mutable DO_LETOKEN
)
}
"
if
[
-z
"
$DO_LETOKEN
"
]
;
then
DO_LETOKEN
=
""
_err
"You didn't configure a do.de API token yet."
_err
"Please set DO_LETOKEN and try again."
return
1
fi
_saveaccountconf_mutable DO_LETOKEN
"
$DO_LETOKEN
"
_info
"Deleting resource record
$fulldomain
"
response
=
"
$(
_get
"
$DO_API
?token=
$DO_LETOKEN
&domain=
${
fulldomain
}
&action=delete"
)
"
if
_contains
"
${
response
}
"
'success'
;
then
return
0
fi
_err
"Could not delete resource record, check logs"
_err
"
${
response
}
"
return
1
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment