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
5f2d8c01
Commit
5f2d8c01
authored
Oct 03, 2017
by
neil
Committed by
GitHub
Oct 03, 2017
Browse files
Merge pull request #1052 from sahsanu/patch-1
Update dns_cloudns.sh to be able to save ID and PASSWORD
parents
0427e8bb
c73c33f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_cloudns.sh
View file @
5f2d8c01
...
@@ -96,6 +96,16 @@ _dns_cloudns_init_check() {
...
@@ -96,6 +96,16 @@ _dns_cloudns_init_check() {
return
0
return
0
fi
fi
CLOUDNS_AUTH_ID
=
"
${
CLOUDNS_AUTH_ID
:-
$(
_readaccountconf_mutable CLOUDNS_AUTH_ID
)
}
"
CLOUDNS_AUTH_PASSWORD
=
"
${
CLOUDNS_AUTH_PASSWORD
:-
$(
_readaccountconf_mutable CLOUDNS_AUTH_PASSWORD
)
}
"
if
[
-z
"
$CLOUDNS_AUTH_ID
"
]
||
[
-z
"
$CLOUDNS_AUTH_PASSWORD
"
]
;
then
CLOUDNS_AUTH_ID
=
""
CLOUDNS_AUTH_PASSWORD
=
""
_err
"You don't specify cloudns api id and password yet."
_err
"Please create you id and password and try again."
return
1
fi
if
[
-z
"
$CLOUDNS_AUTH_ID
"
]
;
then
if
[
-z
"
$CLOUDNS_AUTH_ID
"
]
;
then
_err
"CLOUDNS_AUTH_ID is not configured"
_err
"CLOUDNS_AUTH_ID is not configured"
return
1
return
1
...
@@ -113,6 +123,10 @@ _dns_cloudns_init_check() {
...
@@ -113,6 +123,10 @@ _dns_cloudns_init_check() {
return
1
return
1
fi
fi
#save the api id and password to the account conf file.
_saveaccountconf_mutable CLOUDNS_AUTH_ID
"
$CLOUDNS_AUTH_ID
"
_saveaccountconf_mutable CLOUDNS_AUTH_PASSWORD
"
$CLOUDNS_AUTH_PASSWORD
"
CLOUDNS_INIT_CHECK_COMPLETED
=
1
CLOUDNS_INIT_CHECK_COMPLETED
=
1
return
0
return
0
...
...
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