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
28145a9d
Commit
28145a9d
authored
Feb 14, 2018
by
neilpang
Browse files
fix ovh
parent
fa991c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_cx.sh
View file @
28145a9d
...
@@ -62,7 +62,6 @@ existing_records() {
...
@@ -62,7 +62,6 @@ existing_records() {
_debug
"Getting txt records"
_debug
"Getting txt records"
root
=
$1
root
=
$1
sub
=
$2
sub
=
$2
count
=
0
if
!
_rest GET
"record/
$_domain_id
?:domain_id?host_id=0&offset=0&row_num=100"
;
then
if
!
_rest GET
"record/
$_domain_id
?:domain_id?host_id=0&offset=0&row_num=100"
;
then
return
1
return
1
fi
fi
...
...
dnsapi/dns_ovh.sh
View file @
28145a9d
...
@@ -79,6 +79,9 @@ _ovh_get_api() {
...
@@ -79,6 +79,9 @@ _ovh_get_api() {
}
}
_initAuth
()
{
_initAuth
()
{
OVH_AK
=
"
${
OVH_AK
:-
$(
_readaccountconf_mutable OVH_AK
)
}
"
OVH_AS
=
"
${
OVH_AS
:-
$(
_readaccountconf_mutable OVH_AS
)
}
"
if
[
-z
"
$OVH_AK
"
]
||
[
-z
"
$OVH_AS
"
]
;
then
if
[
-z
"
$OVH_AK
"
]
||
[
-z
"
$OVH_AS
"
]
;
then
OVH_AK
=
""
OVH_AK
=
""
OVH_AS
=
""
OVH_AS
=
""
...
@@ -87,21 +90,22 @@ _initAuth() {
...
@@ -87,21 +90,22 @@ _initAuth() {
return
1
return
1
fi
fi
#save the api key and email to the account conf file.
_saveaccountconf_mutable OVH_AK
"
$OVH_AK
"
_saveaccountconf OVH_AK
"
$OVH_AK
"
_saveaccountconf_mutable OVH_AS
"
$OVH_AS
"
_saveaccountconf OVH_AS
"
$OVH_AS
"
OVH_END_POINT
=
"
${
OVH_END_POINT
:-
$(
_readaccountconf_mutable OVH_END_POINT
)
}
"
if
[
-z
"
$OVH_END_POINT
"
]
;
then
if
[
-z
"
$OVH_END_POINT
"
]
;
then
OVH_END_POINT
=
"ovh-eu"
OVH_END_POINT
=
"ovh-eu"
fi
fi
_info
"Using OVH endpoint:
$OVH_END_POINT
"
_info
"Using OVH endpoint:
$OVH_END_POINT
"
if
[
"
$OVH_END_POINT
"
!=
"ovh-eu"
]
;
then
if
[
"
$OVH_END_POINT
"
!=
"ovh-eu"
]
;
then
_saveaccountconf OVH_END_POINT
"
$OVH_END_POINT
"
_saveaccountconf
_mutable
OVH_END_POINT
"
$OVH_END_POINT
"
fi
fi
OVH_API
=
"
$(
_ovh_get_api
$OVH_END_POINT
)
"
OVH_API
=
"
$(
_ovh_get_api
$OVH_END_POINT
)
"
_debug OVH_API
"
$OVH_API
"
_debug OVH_API
"
$OVH_API
"
OVH_CK
=
"
${
OVH_CK
:-
$(
_readaccountconf_mutable OVH_CK
)
}
"
if
[
-z
"
$OVH_CK
"
]
;
then
if
[
-z
"
$OVH_CK
"
]
;
then
_info
"OVH consumer key is empty, Let's get one:"
_info
"OVH consumer key is empty, Let's get one:"
if
!
_ovh_authentication
;
then
if
!
_ovh_authentication
;
then
...
...
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