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
f0b5f592
Unverified
Commit
f0b5f592
authored
Sep 20, 2022
by
neil
Committed by
GitHub
Sep 20, 2022
Browse files
Merge pull request #4310 from mystix/patch-1
Prevent erasure of saved access token on DNS removal
parents
5cd0db32
773a2a6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_netlify.sh
View file @
f0b5f592
...
@@ -18,15 +18,15 @@ dns_netlify_add() {
...
@@ -18,15 +18,15 @@ dns_netlify_add() {
NETLIFY_ACCESS_TOKEN
=
""
NETLIFY_ACCESS_TOKEN
=
""
_err
"Please specify your Netlify Access Token and try again."
_err
"Please specify your Netlify Access Token and try again."
return
1
return
1
else
_saveaccountconf_mutable NETLIFY_ACCESS_TOKEN
"
$NETLIFY_ACCESS_TOKEN
"
fi
fi
_info
"Using Netlify"
_info
"Using Netlify"
_debug fulldomain
"
$fulldomain
"
_debug fulldomain
"
$fulldomain
"
_debug txtvalue
"
$txtvalue
"
_debug txtvalue
"
$txtvalue
"
_saveaccountconf_mutable NETLIFY_ACCESS_TOKEN
"
$NETLIFY_ACCESS_TOKEN
"
if
!
_get_root
"
$fulldomain
"
;
then
if
!
_get_root
"
$fulldomain
"
"
$accesstoken
"
;
then
_err
"invalid domain"
_err
"invalid domain"
return
1
return
1
fi
fi
...
@@ -62,9 +62,9 @@ dns_netlify_rm() {
...
@@ -62,9 +62,9 @@ dns_netlify_rm() {
_debug txtdomain
"
$txtdomain
"
_debug txtdomain
"
$txtdomain
"
_debug txt
"
$txt
"
_debug txt
"
$txt
"
_saveaccountconf_mutable NETLIFY_ACCESS_TOKEN
"
$
NETLIFY_ACCESS_TOKEN
"
NETLIFY_ACCESS_TOKEN
=
"
${
NETLIFY_ACCESS_TOKEN
:-
$(
_readaccountconf_mutable
NETLIFY_ACCESS_TOKEN
)
}
"
if
!
_get_root
"
$txtdomain
"
"
$accesstoken
"
;
then
if
!
_get_root
"
$txtdomain
"
;
then
_err
"invalid domain"
_err
"invalid domain"
return
1
return
1
fi
fi
...
...
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