Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
4dd20274
Commit
4dd20274
authored
Mar 13, 2021
by
qkdreyer
Committed by
Alexander Kulumbeg
Mar 21, 2021
Browse files
fix: prevent rate limit
parent
42ab98b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_porkbun.sh
View file @
4dd20274
...
@@ -35,14 +35,6 @@ dns_porkbun_add() {
...
@@ -35,14 +35,6 @@ dns_porkbun_add() {
_debug _sub_domain
"
$_sub_domain
"
_debug _sub_domain
"
$_sub_domain
"
_debug _domain
"
$_domain
"
_debug _domain
"
$_domain
"
_debug
"Getting txt records"
_porkbun_rest POST
"dns/retrieve/
$_domain
"
if
!
echo
"
$response
"
|
tr
-d
" "
|
grep
'\"status\":"SUCCESS"'
>
/dev/null
;
then
_err
"Error
$response
"
return
1
fi
# For wildcard cert, the main root domain and the wildcard domain have the same txt subdomain name, so
# For wildcard cert, the main root domain and the wildcard domain have the same txt subdomain name, so
# we can not use updating anymore.
# we can not use updating anymore.
# count=$(printf "%s\n" "$response" | _egrep_o "\"count\":[^,]*" | cut -d : -f 2)
# count=$(printf "%s\n" "$response" | _egrep_o "\"count\":[^,]*" | cut -d : -f 2)
...
@@ -81,14 +73,6 @@ dns_porkbun_rm() {
...
@@ -81,14 +73,6 @@ dns_porkbun_rm() {
_debug _sub_domain
"
$_sub_domain
"
_debug _sub_domain
"
$_sub_domain
"
_debug _domain
"
$_domain
"
_debug _domain
"
$_domain
"
_debug
"Getting txt records"
_porkbun_rest POST
"dns/retrieve/
$_domain
"
if
!
echo
"
$response
"
|
tr
-d
" "
|
grep
'\"status\":"SUCCESS"'
>
/dev/null
;
then
_err
"Error:
$response
"
return
1
fi
count
=
$(
echo
"
$response
"
| _egrep_o
"
\"
count
\"
: *[^,]*"
|
cut
-d
:
-f
2 |
tr
-d
" "
)
count
=
$(
echo
"
$response
"
| _egrep_o
"
\"
count
\"
: *[^,]*"
|
cut
-d
:
-f
2 |
tr
-d
" "
)
_debug count
"
$count
"
_debug count
"
$count
"
if
[
"
$count
"
=
"0"
]
;
then
if
[
"
$count
"
=
"0"
]
;
then
...
@@ -162,6 +146,8 @@ _porkbun_rest() {
...
@@ -162,6 +146,8 @@ _porkbun_rest() {
response
=
"
$(
_get
"
$PORKBUN_Api
/
$ep
"
)
"
response
=
"
$(
_get
"
$PORKBUN_Api
/
$ep
"
)
"
fi
fi
_sleep 3
# prevent rate limit
if
[
"
$?
"
!=
"0"
]
;
then
if
[
"
$?
"
!=
"0"
]
;
then
_err
"error
$ep
"
_err
"error
$ep
"
return
1
return
1
...
...
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