Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
4e05062d
Commit
4e05062d
authored
Apr 30, 2018
by
Roman Bližík
Browse files
add tele3-dns plugin
parent
edb4d066
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
4e05062d
...
@@ -319,6 +319,7 @@ You don't have to do anything manually!
...
@@ -319,6 +319,7 @@ You don't have to do anything manually!
1.
Zilore (https://zilore.com)
1.
Zilore (https://zilore.com)
1.
Loopia.se API
1.
Loopia.se API
1.
acme-dns (https://github.com/joohoi/acme-dns)
1.
acme-dns (https://github.com/joohoi/acme-dns)
1.
TELE3 (https://www.tele3.cz)
And:
And:
...
...
dnsapi/README.md
View file @
4e05062d
...
@@ -859,7 +859,19 @@ acme.sh --issue --dns dns_acmedns -d example.com -d www.example.com
...
@@ -859,7 +859,19 @@ acme.sh --issue --dns dns_acmedns -d example.com -d www.example.com
The credentials will be saved in
`~/.acme.sh/account.conf`
and will
The credentials will be saved in
`~/.acme.sh/account.conf`
and will
be reused when needed.
be reused when needed.
## 46. Use TELE3 API
First you need to login to your TELE3 account to set your API-KEY.
https://www.tele3.cz/system-acme-api.html
```
export TELE3_Key="MS2I4uPPaI..."
export TELE3_Secret="kjhOIHGJKHg"
acme.sh --issue --dns dns_tele3 -d example.com -d *.example.com
```
The TELE3_Key and TELE3_Secret will be saved in ~/.acme.sh/account.conf and will be reused when needed.
# Use custom API
# Use custom API
If your API is not supported yet, you can write your own DNS API.
If your API is not supported yet, you can write your own DNS API.
...
...
dnsapi/dns_tele3.sh
0 → 100644
View file @
4e05062d
#!/usr/bin/env sh
#
# tele3.cz DNS API
#
# Author: Roman Blizik
# Report Bugs here: https://github.com/par-pa/acme.sh
#
# --
# export TELE3_Key="MS2I4uPPaI..."
# export TELE3_Secret="kjhOIHGJKHg"
# --
TELE3_API
=
"https://www.tele3.cz/acme/"
######## Public functions #####################
dns_tele3_add
()
{
_info
"Using TELE3 DNS"
data
=
"
\"
ope
\"
:
\"
add
\"
,
\"
domain
\"
:
\"
$1
\"
,
\"
value
\"
:
\"
$2
\"
"
if
!
_tele3_call
;
then
_err
"Publish zone failed"
return
1
fi
_info
"Zone published"
}
dns_tele3_rm
()
{
_info
"Using TELE3 DNS"
data
=
"
\"
ope
\"
:
\"
rm
\"
,
\"
domain
\"
:
\"
$1
\"
,
\"
value
\"
:
\"
$2
\"
"
if
!
_tele3_call
;
then
_err
"delete TXT record failed"
return
1
fi
_info
"TXT record successfully deleted"
}
#################### Private functions below ##################################
_tele3_init
()
{
TELE3_Key
=
"
${
TELE3_Key
:-
$(
_readaccountconf_mutable TELE3_Key
)
}
"
TELE3_Secret
=
"
${
TELE3_Secret
:-
$(
_readaccountconf_mutable TELE3_Secret
)
}
"
if
[
-z
"
$TELE3_Key
"
]
||
[
-z
"
$TELE3_Secret
"
]
;
then
TELE3_Key
=
""
TELE3_Secret
=
""
_err
"You must export variables: TELE3_Key and TELE3_Secret"
return
1
fi
#save the config variables to the account conf file.
_saveaccountconf_mutable TELE3_Key
"
$TELE3_Key
"
_saveaccountconf_mutable TELE3_Secret
"
$TELE3_Secret
"
}
_tele3_call
()
{
_tele3_init
data
=
"{
\"
key
\"
:
\"
$TELE3_Key
\"
,
\"
secret
\"
:
\"
$TELE3_Secret
\"
,
$data
}"
_debug data
"
$data
"
response
=
"
$(
_post
"
$data
"
"
$TELE3_API
"
""
"POST"
)
"
_debug response
"
$response
"
if
[
"
$response
"
!=
"success"
]
;
then
_err
"
$response
"
return
1
fi
}
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