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
dca6a4bb
Unverified
Commit
dca6a4bb
authored
Oct 30, 2019
by
peterkelm
Committed by
GitHub
Oct 30, 2019
Browse files
minor formatting changes
parent
c1b089d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_variomedia.sh
View file @
dca6a4bb
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
VARIOMEDIA_API
=
"https://api.variomedia.de"
VARIOMEDIA_API
=
"https://api.variomedia.de"
########
Public functions #####################
######## Public functions #####################
#Usage: add
_acme-challenge.www.domain.com
"XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_variomedia_add
()
{
dns_variomedia_add
()
{
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
txtvalue
=
$2
...
@@ -69,7 +69,7 @@ dns_variomedia_rm() {
...
@@ -69,7 +69,7 @@ dns_variomedia_rm() {
return
1
return
1
fi
fi
_record_id
=
"
$(
echo
$response
|
cut
-d
'['
-f2
|
cut
-d
']'
-f1
|
sed
's/},[ \t]*{/\},§\{/g'
|
tr
§
'\n'
|
grep
$_sub_domain
|
grep
$txtvalue
|
sed
's/^{//;s/}[,]?$//'
|
tr
,
'\n'
|
tr
-d
'\"'
|
grep
^id |
cut
-d
:
-f2
|
tr
-d
' '
)
"
_record_id
=
"
$(
echo
$response
|
cut
-d
'['
-f2
|
cut
-d
']'
-f1
|
sed
's/},[ \t]*{/\},§\{/g'
|
tr
§
'\n'
|
grep
"
$_sub_domain
"
|
grep
"
$txtvalue
"
|
sed
's/^{//;s/}[,]?$//'
|
tr
,
'\n'
|
tr
-d
'\"'
|
grep
^id |
cut
-d
:
-f2
|
tr
-d
' '
)
"
_debug _record_id
"
$_record_id
"
_debug _record_id
"
$_record_id
"
if
[
"
$_record_id
"
]
;
then
if
[
"
$_record_id
"
]
;
then
_info
"Successfully retrieved the record id for ACME challenge."
_info
"Successfully retrieved the record id for ACME challenge."
...
@@ -87,7 +87,7 @@ dns_variomedia_rm() {
...
@@ -87,7 +87,7 @@ dns_variomedia_rm() {
return
0
return
0
}
}
####################
Private functions below ##################################
#################### Private functions below ##################################
#_acme-challenge.www.domain.com
#_acme-challenge.www.domain.com
#returns
#returns
# _sub_domain=_acme-challenge.www
# _sub_domain=_acme-challenge.www
...
@@ -117,7 +117,6 @@ _get_root() {
...
@@ -117,7 +117,6 @@ _get_root() {
done
done
_debug
"root domain not found"
_debug
"root domain not found"
return
1
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