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
2befb5e7
Commit
2befb5e7
authored
Jan 09, 2018
by
neilpang
Browse files
fix ovh
parent
6d5e7826
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_ovh.sh
View file @
2befb5e7
...
...
@@ -114,8 +114,7 @@ _initAuth() {
_info
"Checking authentication"
response
=
"
$(
_ovh_rest GET
"domain"
)
"
if
_contains
"
$response
"
"INVALID_CREDENTIAL"
;
then
if
!
_ovh_rest GET
"domain"
||
_contains
"
$response
"
"INVALID_CREDENTIAL"
;
then
_err
"The consumer key is invalid:
$OVH_CK
"
_err
"Please retry to create a new one."
_clearaccountconf OVH_CK
...
...
@@ -150,8 +149,7 @@ dns_ovh_add() {
if
_contains
"
$response
"
"
$txtvalue
"
;
then
_ovh_rest POST
"domain/zone/
$_domain
/refresh"
_debug
"Refresh:
$response
"
_info
"Added, sleeping 10 seconds"
sleep
10
_info
"Added"
return
0
fi
fi
...
...
@@ -303,8 +301,8 @@ _ovh_rest() {
response
=
"
$(
_get
"
$_ovh_url
"
)
"
fi
if
[
"
$?
"
!=
"0"
]
;
then
_err
"error
$e
p
"
if
[
"
$?
"
!=
"0"
]
||
_contains
"
$response
"
"INVALID_CREDENTIAL"
;
then
_err
"error
$
respons
e
"
return
1
fi
_debug2 response
"
$response
"
...
...
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