mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-29 21:56:57 +00:00
Merge da31435016fe150f748f26ec3c260462a915cbd0 into b0535d8b40a30f9fd2b26b3ea2a49469dcb4d0a8
This commit is contained in:
commit
0ff7a42a10
27
dnsapi/dns_myaddr.sh
Normal file
27
dnsapi/dns_myaddr.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
dns_myaddr_add() {
|
||||||
|
txtvalue=$2
|
||||||
|
|
||||||
|
myaddr_key="${myaddr_key:-$(_readaccountconf_mutable myaddr_key)}"
|
||||||
|
if [ -z "$myaddr_key" ]; then
|
||||||
|
myaddr_key=""
|
||||||
|
_err "You don't specify api key yet."
|
||||||
|
_err "Please create your key and try again."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#save the credentials to the account conf file.
|
||||||
|
_saveaccountconf_mutable myaddr_key "$myaddr_key"
|
||||||
|
|
||||||
|
data="key=${myaddr_key}&acme_challenge=${txtvalue}"
|
||||||
|
_post "${data}" 'https://myaddr.tools/update'
|
||||||
|
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
_err "Failed to send message"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
dns_myaddr_rm() {
|
||||||
|
_debug "this is just to prevent an error in acme.sh, myaddr will automatic remove the txts after few minutes"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user