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
c1b089d1
Unverified
Commit
c1b089d1
authored
Oct 27, 2019
by
peterkelm
Committed by
GitHub
Oct 27, 2019
Browse files
unused code removed
parent
1271f97b
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_variomedia.sh
View file @
c1b089d1
...
...
@@ -30,14 +30,6 @@ dns_variomedia_add() {
_debug _sub_domain
"
$_sub_domain
"
_debug _domain
"
$_domain
"
# _debug 'Getting txt records'
# _variomedia_rest GET "/dns-records?filter[domain]=$_domain"
# if printf "%s\n" "$response" | grep "\"record_type\": \"A\", \"fqdn\": \"$fulldomain\"" >/dev/null; then
# _err 'Error'
# return 1
# fi
if
!
_variomedia_rest POST
"dns-records"
"{
\"
data
\"
: {
\"
type
\"
:
\"
dns-record
\"
,
\"
attributes
\"
: {
\"
record_type
\"
:
\"
TXT
\"
,
\"
name
\"
:
\"
$_sub_domain
\"
,
\"
domain
\"
:
\"
$_domain
\"
,
\"
data
\"
:
\"
$txtvalue
\"
,
\"
ttl
\"
:300}}}"
;
then
_err
"
$response
"
return
1
...
...
@@ -119,13 +111,7 @@ _get_root() {
_sub_domain
=
"
$(
echo
"
$fulldomain
"
|
sed
"s/
\\
.
$h
\$
//"
)
"
_domain
=
$h
return
0
# else
# _err 'Invalid domain'
# return 1
fi
# else
# _err "$response"
# return 1
fi
i
=
$(
_math
"
$i
"
+ 1
)
done
...
...
@@ -141,10 +127,6 @@ _variomedia_rest() {
data
=
"
$3
"
_debug
"
$ep
"
# api_key_trimmed=$(echo $VARIOMEDIA_API_TOKEN | tr -d '"')
# export _H1="Api-Key: $api_key_trimmed"
export
_H1
=
"Authorization: token
$VARIOMEDIA_API_TOKEN
"
export
_H2
=
"Content-Type: application/vnd.api+json"
export
_H3
=
"Accept: application/vnd.variomedia.v1+json"
...
...
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