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
e3c4c926
Unverified
Commit
e3c4c926
authored
Sep 03, 2023
by
KincaidYang
Committed by
GitHub
Sep 03, 2023
Browse files
Replace some functions.
parent
b3f8612e
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_tencent.sh
View file @
e3c4c926
...
@@ -45,14 +45,14 @@ dns_tencent_rm() {
...
@@ -45,14 +45,14 @@ dns_tencent_rm() {
_debug
"Get record list"
_debug
"Get record list"
attempt
=
1
attempt
=
1
max_attempts
=
5
max_attempts
=
5
while
[
-z
"
$record_id
"
]
&&
[
$attempt
-le
$max_attempts
]
;
do
while
[
-z
"
$record_id
"
]
&&
[
"
$attempt
"
-le
$max_attempts
]
;
do
_check_exist_query
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
&&
_tencent_rest
"DescribeRecordFilterList"
_check_exist_query
"
$_domain
"
"
$_sub_domain
"
"
$txtvalue
"
&&
_tencent_rest
"DescribeRecordFilterList"
record_id
=
"
$(
echo
"
$response
"
| _egrep_o
"
\"
RecordId
\"
:
\s
*[0-9]+"
| _egrep_o
"[0-9]+"
)
"
record_id
=
"
$(
echo
"
$response
"
| _egrep_o
"
\"
RecordId
\"
:
\s
*[0-9]+"
| _egrep_o
"[0-9]+"
)
"
_debug2 record_id
"
$record_id
"
_debug2 record_id
"
$record_id
"
if
[
-z
"
$record_id
"
]
;
then
if
[
-z
"
$record_id
"
]
;
then
_debug
"Due to TencentCloud API synchronization delay, record not found, waiting 10 seconds and retrying"
_debug
"Due to TencentCloud API synchronization delay, record not found, waiting 10 seconds and retrying"
_sleep 10
_sleep 10
attempt
=
$(
(
attempt
+
1
)
)
attempt
=
$(
_math
"
$
attempt
+ 1
"
)
fi
fi
done
done
...
@@ -162,7 +162,7 @@ tencent_hmac_sha256_hexkey() {
...
@@ -162,7 +162,7 @@ tencent_hmac_sha256_hexkey() {
tencent_signature_v3
()
{
tencent_signature_v3
()
{
service
=
$1
service
=
$1
action
=
$(
echo
"
$2
"
|
tr
'[:upper:]'
'[:lower:]'
)
action
=
$(
echo
"
$2
"
|
_lower_case
)
payload
=
${
3
:-
'{}'
}
payload
=
${
3
:-
'{}'
}
timestamp
=
${
4
:-
$(
date
+%s
)
}
timestamp
=
${
4
:-
$(
date
+%s
)
}
...
...
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