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
9a677534
Commit
9a677534
authored
Feb 13, 2022
by
peter
Browse files
added more debug info when rm recordid is empty
parent
af08d67f
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_curanet.sh
View file @
9a677534
...
@@ -95,6 +95,14 @@ dns_curanet_rm() {
...
@@ -95,6 +95,14 @@ dns_curanet_rm() {
fi
fi
recordid
=
$(
echo
"
$response
"
| _egrep_o
"{
\"
id
\"
:[0-9]+,
\"
name
\"
:
\"
$fulldomain
\"
,
\"
type
\"
:
\"
TXT
\"
,
\"
ttl
\"
:60,
\"
priority
\"
:0,
\"
data
\"
:
\"
..
$txtvalue
"
| _egrep_o
"id
\"
:[0-9]+"
|
cut
-c
5-
)
recordid
=
$(
echo
"
$response
"
| _egrep_o
"{
\"
id
\"
:[0-9]+,
\"
name
\"
:
\"
$fulldomain
\"
,
\"
type
\"
:
\"
TXT
\"
,
\"
ttl
\"
:60,
\"
priority
\"
:0,
\"
data
\"
:
\"
..
$txtvalue
"
| _egrep_o
"id
\"
:[0-9]+"
|
cut
-c
5-
)
if
[
-z
"
$recordid
"
]
;
then
_err
"Unable to get recordid"
_debug
"regex {
\"
id
\"
:[0-9]+,
\"
name
\"
:
\"
$fulldomain
\"
,
\"
type
\"
:
\"
TXT
\"
,
\"
ttl
\"
:60,
\"
priority
\"
:0,
\"
data
\"
:
\"
..
$txtvalue
"
_debug
"response
$response
"
return
1
fi
_debug
"Deleting recordID
$recordid
"
_debug
"Deleting recordID
$recordid
"
response
=
"
$(
_post
""
"
$CURANET_REST_URL
/
${
_domain
}
/Records/
$recordid
"
""
"DELETE"
)
"
response
=
"
$(
_post
""
"
$CURANET_REST_URL
/
${
_domain
}
/Records/
$recordid
"
""
"DELETE"
)
"
return
0
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