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
e340593a
Unverified
Commit
e340593a
authored
May 23, 2019
by
der-berni
Committed by
GitHub
May 23, 2019
Browse files
Revert parameter changes
Revert ONECOM_PASSWORD back to ONECOM_Password and ONECOM_USER back to ONECOM_User
parent
68b42a00
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_one.sh
View file @
e340593a
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
# Fixed by: @der-berni
# Fixed by: @der-berni
# Modified: 2019-05-20
# Modified: 2019-05-20
#
#
# export ONECOM_U
SER
="username"
# export ONECOM_U
ser
="username"
# export ONECOM_P
ASSWORD
="password"
# export ONECOM_P
assword
="password"
#
#
# Usage:
# Usage:
# acme.sh --issue --dns dns_one -d example.com
# acme.sh --issue --dns dns_one -d example.com
...
@@ -35,26 +35,26 @@ dns_one_add() {
...
@@ -35,26 +35,26 @@ dns_one_add() {
_debug mydomain
"
$mydomain
"
_debug mydomain
"
$mydomain
"
# get credentials
# get credentials
ONECOM_U
SER
=
"
${
ONECOM_U
SER
:-
$(
_readaccountconf_mutable ONECOM_U
SER
)
}
"
ONECOM_U
ser
=
"
${
ONECOM_U
ser
:-
$(
_readaccountconf_mutable ONECOM_U
ser
)
}
"
ONECOM_P
ASSWORD
=
"
${
ONECOM_P
ASSWORD
:-
$(
_readaccountconf_mutable ONECOM_P
ASSWORD
)
}
"
ONECOM_P
assword
=
"
${
ONECOM_P
assword
:-
$(
_readaccountconf_mutable ONECOM_P
assword
)
}
"
if
[
-z
"
$ONECOM_U
SER
"
]
||
[
-z
"
$ONECOM_P
ASSWORD
"
]
;
then
if
[
-z
"
$ONECOM_U
ser
"
]
||
[
-z
"
$ONECOM_P
assword
"
]
;
then
ONECOM_U
SER
=
""
ONECOM_U
ser
=
""
ONECOM_P
ASSWORD
=
""
ONECOM_P
assword
=
""
_err
"You didn't specify a one.com username and password yet."
_err
"You didn't specify a one.com username and password yet."
_err
"Please create the key and try again."
_err
"Please create the key and try again."
return
1
return
1
fi
fi
#save the api key and email to the account conf file.
#save the api key and email to the account conf file.
_saveaccountconf_mutable ONECOM_U
SER
"
$ONECOM_U
SER
"
_saveaccountconf_mutable ONECOM_U
ser
"
$ONECOM_U
ser
"
_saveaccountconf_mutable ONECOM_P
ASSWORD
"
$ONECOM_P
ASSWORD
"
_saveaccountconf_mutable ONECOM_P
assword
"
$ONECOM_P
assword
"
# Login with user and password
# Login with user and password
postdata
=
"loginDomain=true"
postdata
=
"loginDomain=true"
postdata
=
"
$postdata
&displayUsername=
$ONECOM_U
SER
"
postdata
=
"
$postdata
&displayUsername=
$ONECOM_U
ser
"
postdata
=
"
$postdata
&username=
$ONECOM_U
SER
"
postdata
=
"
$postdata
&username=
$ONECOM_U
ser
"
postdata
=
"
$postdata
&targetDomain=
$mydomain
"
postdata
=
"
$postdata
&targetDomain=
$mydomain
"
postdata
=
"
$postdata
&password1=
$ONECOM_P
ASSWORD
"
postdata
=
"
$postdata
&password1=
$ONECOM_P
assword
"
postdata
=
"
$postdata
&loginTarget="
postdata
=
"
$postdata
&loginTarget="
#_debug postdata "$postdata"
#_debug postdata "$postdata"
...
@@ -118,11 +118,11 @@ dns_one_rm() {
...
@@ -118,11 +118,11 @@ dns_one_rm() {
_debug mydomain
"
$mydomain
"
_debug mydomain
"
$mydomain
"
# get credentials
# get credentials
ONECOM_U
SER
=
"
${
ONECOM_U
SER
:-
$(
_readaccountconf_mutable ONECOM_U
SER
)
}
"
ONECOM_U
ser
=
"
${
ONECOM_U
ser
:-
$(
_readaccountconf_mutable ONECOM_U
ser
)
}
"
ONECOM_P
ASSWORD
=
"
${
ONECOM_P
ASSWORD
:-
$(
_readaccountconf_mutable ONECOM_P
ASSWORD
)
}
"
ONECOM_P
assword
=
"
${
ONECOM_P
assword
:-
$(
_readaccountconf_mutable ONECOM_P
assword
)
}
"
if
[
-z
"
$ONECOM_U
SER
"
]
||
[
-z
"
$ONECOM_P
ASSWORD
"
]
;
then
if
[
-z
"
$ONECOM_U
ser
"
]
||
[
-z
"
$ONECOM_P
assword
"
]
;
then
ONECOM_U
SER
=
""
ONECOM_U
ser
=
""
ONECOM_P
ASSWORD
=
""
ONECOM_P
assword
=
""
_err
"You didn't specify a one.com username and password yet."
_err
"You didn't specify a one.com username and password yet."
_err
"Please create the key and try again."
_err
"Please create the key and try again."
return
1
return
1
...
@@ -130,10 +130,10 @@ dns_one_rm() {
...
@@ -130,10 +130,10 @@ dns_one_rm() {
# Login with user and password
# Login with user and password
postdata
=
"loginDomain=true"
postdata
=
"loginDomain=true"
postdata
=
"
$postdata
&displayUsername=
$ONECOM_U
SER
"
postdata
=
"
$postdata
&displayUsername=
$ONECOM_U
ser
"
postdata
=
"
$postdata
&username=
$ONECOM_U
SER
"
postdata
=
"
$postdata
&username=
$ONECOM_U
ser
"
postdata
=
"
$postdata
&targetDomain=
$mydomain
"
postdata
=
"
$postdata
&targetDomain=
$mydomain
"
postdata
=
"
$postdata
&password1=
$ONECOM_P
ASSWORD
"
postdata
=
"
$postdata
&password1=
$ONECOM_P
assword
"
postdata
=
"
$postdata
&loginTarget="
postdata
=
"
$postdata
&loginTarget="
#CURL does not work
#CURL does not work
...
...
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