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
a8f0fd1f
Unverified
Commit
a8f0fd1f
authored
Apr 29, 2019
by
neil
Committed by
GitHub
Apr 29, 2019
Browse files
Merge pull request #2240 from Neilpang/dev
use mutable
parents
6489cfbc
a89d50d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_cx.sh
View file @
a8f0fd1f
...
...
@@ -16,6 +16,8 @@ dns_cx_add() {
fulldomain
=
$1
txtvalue
=
$2
CX_Key
=
"
${
CX_Key
:-
$(
_readaccountconf_mutable CX_Key
)
}
"
CX_Secret
=
"
${
CX_Secret
:-
$(
_readaccountconf_mutable CX_Secret
)
}
"
if
[
-z
"
$CX_Key
"
]
||
[
-z
"
$CX_Secret
"
]
;
then
CX_Key
=
""
CX_Secret
=
""
...
...
@@ -27,8 +29,8 @@ dns_cx_add() {
REST_API
=
"
$CX_Api
"
#save the api key and email to the account conf file.
_saveaccountconf CX_Key
"
$CX_Key
"
_saveaccountconf CX_Secret
"
$CX_Secret
"
_saveaccountconf
_mutable
CX_Key
"
$CX_Key
"
_saveaccountconf
_mutable
CX_Secret
"
$CX_Secret
"
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
...
...
@@ -43,6 +45,8 @@ dns_cx_add() {
dns_cx_rm
()
{
fulldomain
=
$1
txtvalue
=
$2
CX_Key
=
"
${
CX_Key
:-
$(
_readaccountconf_mutable CX_Key
)
}
"
CX_Secret
=
"
${
CX_Secret
:-
$(
_readaccountconf_mutable CX_Secret
)
}
"
REST_API
=
"
$CX_Api
"
if
_get_root
"
$fulldomain
"
;
then
record_id
=
""
...
...
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