Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue2547 throw nic token #2678

Merged
merged 8 commits into from Jan 9, 2020
Merged

Issue2547 throw nic token #2678

merged 8 commits into from Jan 9, 2020

Conversation

@Sergey-Zorin
Copy link
Contributor

Sergey-Zorin commented Jan 6, 2020

Тhis request concerns #2547 (comment).

New environment variables for running acme.sh --issue --dns dns_nic ...

export NIC_Username='000000/NIC-D'
export NIC_Password='xxxxxxxx'
export NIC_ClientID='xxxxxxxx'
export NIC_ClientSecret='xxxxxxxx'

New behavior is backward compatible with old implementation
If NIC_ClientID or NIC_ClientSecret are not available from environment or saved config,
script try to find old NIC_Token and use it for calculation NIC_ClientID and NIC_ClientSecret.

@@ -146,7 +166,7 @@ _get_root() {
if _contains "$_all_domains" "^$h$"; then
_sub_domain=$(printf "%s" "$domain" | cut -d . -f 1-$p)
_domain=$h
_service=$(printf "%s" "$response" | grep "$_domain" | sed -r "s/.*service=\"(.*)\".*$/\1/")
_service=$(printf "%s" "$response" | grep -F "idn-name=\"$_domain\"" | sed -r "s/.*service=\"(.*)\".*$/\1/")

This comment has been minimized.

Copy link
@Neilpang

Neilpang Jan 9, 2020

Owner

can you please not use grep -F option?

@Neilpang Neilpang merged commit c7ccddb into Neilpang:dev Jan 9, 2020
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.