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

Add dns_kinghost.sh #1420

Merged
merged 17 commits into from
Mar 28, 2018
Merged

Add dns_kinghost.sh #1420

merged 17 commits into from
Mar 28, 2018

Conversation

fbraz3
Copy link
Contributor

@fbraz3 fbraz3 commented Mar 19, 2018

kinghost.com.br is one of the biggest registrars/web hosts in Brazil and the very first on this country to officially support letsencrypt! =)

@Neilpang
Copy link
Member

fulldomain=$1
txtvalue=$2

KINGHOST_username="${KINGHOST_username:-$(_readaccountconf_mutable KINGHOST_username)}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename: KINGHOST_username => KINGHOST_Username

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad!

Changed as required. ;)


#This API call returns "status":"ok" if dns record does not exists
#We are creating a new txt record here, so we expect the "ok" status
if ! printf "%s" "$response" | grep '"status":"ok"' >/dev/null; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use echo instead of printf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed!

@martgras
Copy link
Contributor

please fix the travis errors.
The travis checks are failing because you're using indentation with 4 spaces instead of 2.

@fbraz3
Copy link
Contributor Author

fbraz3 commented Mar 26, 2018

Hi @martgras
I've fixed the identation as requested, but it's still failing!
I can't find what's wrong now. =(

dnsapi/README.md Outdated
API access must be enabled at https://painel.kinghost.com.br/painel.api.php

```
export KINGHOST_username="yourusername"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KINGHOST_Username

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

fi

#save the credentials to the account conf file.
_saveaccountconf_mutable KINGHOST_Username "$KINGHOST_Username"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace the 2 spaces with only one space here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

fi
_debug2 response "$response"
return 0
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new empty line at the end of file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return 1
fi

return 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove ; here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


KINGHOST_Password="${KINGHOST_Password:-$(_readaccountconf_mutable KINGHOST_Password)}"
KINGHOST_Username="${KINGHOST_Username:-$(_readaccountconf_mutable KINGHOST_Username)}"
if [ -z "$KINGHOST_Password" ] || [ -z "$KINGHOST_Username" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce the indent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Neilpang
Copy link
Member

why not check the CI errors here: https://travis-ci.org/Neilpang/acme.sh/jobs/358428399

@fbraz3
Copy link
Contributor Author

fbraz3 commented Mar 26, 2018

i don't knew shfmt utility until now. Installing and testing here

@Neilpang
Copy link
Member

Hi,

what is dns_infraws.sh in your PR ?

@fbraz3
Copy link
Contributor Author

fbraz3 commented Mar 28, 2018

Hi @Neilpang
dns_infraws.sh was a internal test, was pushed by mistake. Removed!

@Neilpang Neilpang merged commit 795764f into acmesh-official:dev Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants