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
33da8a7f
Unverified
Commit
33da8a7f
authored
Aug 16, 2022
by
stephen
Committed by
GitHub
Aug 16, 2022
Browse files
dns.la official acme script, error fixed
fixed shcheck error
parent
671eecf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_la.sh
View file @
33da8a7f
...
@@ -39,12 +39,12 @@ dns_la_add() {
...
@@ -39,12 +39,12 @@ dns_la_add() {
dns_la_rm
()
{
dns_la_rm
()
{
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
txtvalue
=
$2
_fullkey
=
$(
printf
"%s"
$
{
fulldomain
:16
}
|
tr
'.'
'_'
)
_fullkey
=
$(
printf
"%s"
"
$fulldomain
"
|
awk
'{ string=substr($0, 17); print string; }'
|
tr
'.'
'_'
)
LA_Id
=
"
${
LA_Id
:-
$(
_readaccountconf_mutable LA_Id
)
}
"
LA_Id
=
"
${
LA_Id
:-
$(
_readaccountconf_mutable LA_Id
)
}
"
LA_Key
=
"
${
LA_Key
:-
$(
_readaccountconf_mutable LA_Key
)
}
"
LA_Key
=
"
${
LA_Key
:-
$(
_readaccountconf_mutable LA_Key
)
}
"
_debug fullkey
$_fullkey
_debug fullkey
"
$_fullkey
"
RM_recordid
=
"
$(
_readaccountconf
$_fullkey
)
"
RM_recordid
=
"
$(
_readaccountconf
"
$_fullkey
"
)
"
_debug rm_recordid
"
$RM_recordid
"
_debug rm_recordid
"
$RM_recordid
"
_debug
"detect the root zone"
_debug
"detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
if
!
_get_root
"
$fulldomain
"
;
then
...
@@ -67,7 +67,7 @@ dns_la_rm() {
...
@@ -67,7 +67,7 @@ dns_la_rm() {
return
1
return
1
fi
fi
_clearaccountconf
$_fullkey
_clearaccountconf
"
$_fullkey
"
_contains
"
$response
"
"
\"
code
\"
:300"
_contains
"
$response
"
"
\"
code
\"
:300"
}
}
...
@@ -88,9 +88,9 @@ add_record() {
...
@@ -88,9 +88,9 @@ add_record() {
if
_contains
"
$response
"
"
\"
code
\"
:300"
;
then
if
_contains
"
$response
"
"
\"
code
\"
:300"
;
then
_record_id
=
$(
printf
"%s"
"
$response
"
|
grep
'"resultid"'
|
cut
-d
:
-f
2 |
cut
-d
,
-f
1 |
tr
-d
'\r'
|
tr
-d
'\n'
)
_record_id
=
$(
printf
"%s"
"
$response
"
|
grep
'"resultid"'
|
cut
-d
:
-f
2 |
cut
-d
,
-f
1 |
tr
-d
'\r'
|
tr
-d
'\n'
)
_fullkey
=
$(
printf
"%s"
$
{
fulldomain
:16
}
|
tr
'.'
'_'
)
_fullkey
=
$(
printf
"%s"
"
$fulldomain
"
|
awk
'{ string=substr($0, 17); print string; }'
|
tr
'.'
'_'
)
_debug fullkey
$_fullkey
_debug fullkey
"
$_fullkey
"
_saveaccountconf
$_fullkey
"
$_record_id
"
_saveaccountconf
"
$_fullkey
"
"
$_record_id
"
_debug _record_id
"
$_record_id
"
_debug _record_id
"
$_record_id
"
fi
fi
_contains
"
$response
"
"
\"
code
\"
:300"
_contains
"
$response
"
"
\"
code
\"
:300"
...
...
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