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
bc2ed602
Commit
bc2ed602
authored
Mar 21, 2020
by
ThiloGa
Browse files
deleted txt entry routine by request of namemaster.de, entry is deleted automatically
parent
a1c4d159
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_nm.sh
View file @
bc2ed602
...
@@ -63,34 +63,10 @@ dns_nm_add() {
...
@@ -63,34 +63,10 @@ dns_nm_add() {
dns_nm_rm
()
{
dns_nm_rm
()
{
fulldomain
=
$1
fulldomain
=
$1
txt_value
=
$2
txtvalue
=
$2
_info
"TXT enrty in
$fulldomain
is deleted automatically"
NM_user
=
"
${
NM_user
:-
$(
_readaccountconf_mutable NM_user
)
}
"
_debug fulldomain
"
$fulldomain
"
NM_sha256
=
"
${
NM_sha256
:-
$(
_readaccountconf_mutable NM_sha256
)
}
"
_debug txtvalue
"
$txtvalue
"
if
[
-z
"
$NM_user
"
]
||
[
-z
"
$NM_sha256
"
]
;
then
NM_user
=
""
NM_sha256
=
""
_err
"No auth details provided. Please set user credentials using the
\$
NM_user and
\$
NM_sha256 environment variables."
return
1
fi
zone
=
"
$(
echo
"
$fulldomain
"
| _egrep_o
"[^.]+.[^.]+$"
)
"
get
=
"
$namemaster_api
?User=
$NM_user
&Password=
$NM_sha256
&Antwort=csv&Typ=TXT&Zone=
$zone
&hostname=
$fulldomain
&TXT=
$txt_value
&Action=Delete_IN"
if
!
erg
=
"
$(
_get
"
$get
"
)
"
;
then
_err
"error Deleting
$fulldomain
TXT:
$txt_value
"
return
1
fi
if
_contains
"
$erg
"
"Success"
;
then
_info
"Success, TXT removed, OK"
else
_err
"error Auto
$fulldomain
TXT:
$txt_value
erg:
$erg
"
return
1
fi
_debug
"ok Auto
$fulldomain
TXT:
$txt_value
erg:
$erg
"
return
0
}
}
...
...
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