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
4a9f607d
Commit
4a9f607d
authored
Dec 07, 2017
by
JAA
Browse files
Cleanup
parent
78712245
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_unoeuro.sh
View file @
4a9f607d
...
...
@@ -5,7 +5,7 @@
#
#Uno_User="UExxxxxx"
Uno_Api
=
"https://api.unoeuro.com/1
/
$Uno_User
/
$Uno_Key
"
Uno_Api
=
"https://api.unoeuro.com/1"
######## Public functions #####################
...
...
@@ -25,7 +25,7 @@ dns_unoeuro_add() {
fi
if
!
_contains
"
$Uno_User
"
"UE"
;
then
_err
"It seems that the Uno_User=
$Uno_User
is not a valid
email address
."
_err
"It seems that the Uno_User=
$Uno_User
is not a valid
username
."
_err
"Please check and retry."
return
1
fi
...
...
@@ -94,6 +94,12 @@ dns_unoeuro_rm() {
return
1
fi
if
!
_contains
"
$Uno_User
"
"UE"
;
then
_err
"It seems that the Uno_User=
$Uno_User
is not a valid username."
_err
"Please check and retry."
return
1
fi
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
_err
"invalid domain"
...
...
@@ -174,15 +180,13 @@ _uno_rest() {
data
=
"
$3
"
_debug
"
$ep
"
#export _H1="X-Auth-Email: $Uno_User"
#export _H2="X-Auth-Key: $Uno_Key"
export
_H1
=
"Content-Type: application/json"
if
[
"
$m
"
!=
"GET"
]
;
then
_debug data
"
$data
"
response
=
"
$(
_post
"
$data
"
"
$Uno_Api
/
$ep
"
""
"
$m
"
)
"
response
=
"
$(
_post
"
$data
"
"
$Uno_Api
/
$
Uno_User
/
$Uno_Key
/
$
ep
"
""
"
$m
"
)
"
else
response
=
"
$(
_get
"
$Uno_Api
/
$ep
"
)
"
response
=
"
$(
_get
"
$Uno_Api
/
$
Uno_User
/
$Uno_Key
/
$
ep
"
)
"
fi
if
[
"
$?
"
!=
"0"
]
;
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