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
9b532584
Commit
9b532584
authored
Dec 08, 2020
by
Van Hau TRAN
Browse files
fix: fix delete txt record and error mngtt
parent
5127a9ae
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_scaleway.sh
View file @
9b532584
...
@@ -29,6 +29,12 @@ dns_scaleway_add() {
...
@@ -29,6 +29,12 @@ dns_scaleway_add() {
_info
"Adding record"
_info
"Adding record"
_scaleway_create_TXT_record
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
_scaleway_create_TXT_record
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
if
_contains
"
$response
"
"records"
;
then
return
0
else
_err error
"
$response
"
return
1
fi
_info
"Record added."
_info
"Record added."
return
0
return
0
...
@@ -52,7 +58,13 @@ dns_scaleway_rm() {
...
@@ -52,7 +58,13 @@ dns_scaleway_rm() {
_debug _domain
"
$_domain
"
_debug _domain
"
$_domain
"
_info
"Deleting record"
_info
"Deleting record"
_scaleway_create_TXT_record
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
_scaleway_delete_TXT_record
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
if
_contains
"
$response
"
"records"
;
then
return
0
else
_err error
"
$response
"
return
1
fi
_info
"Record deleted."
_info
"Record deleted."
return
0
return
0
...
@@ -83,7 +95,7 @@ _scaleway_check_config() {
...
@@ -83,7 +95,7 @@ _scaleway_check_config() {
# _domain=domain.com
# _domain=domain.com
_get_root
()
{
_get_root
()
{
domain
=
$1
domain
=
$1
i
=
2
i
=
1
p
=
1
p
=
1
while
true
;
do
while
true
;
do
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
...
...
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