-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add dns_kinghost.sh #1420
Conversation
check this guide. |
dnsapi/dns_kinghost.sh
Outdated
fulldomain=$1 | ||
txtvalue=$2 | ||
|
||
KINGHOST_username="${KINGHOST_username:-$(_readaccountconf_mutable KINGHOST_username)}" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. ;)
dnsapi/dns_kinghost.sh
Outdated
|
||
#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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!
please fix the travis errors. |
Hi @martgras |
dnsapi/README.md
Outdated
API access must be enabled at https://painel.kinghost.com.br/painel.api.php | ||
|
||
``` | ||
export KINGHOST_username="yourusername" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KINGHOST_Username
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
dnsapi/dns_kinghost.sh
Outdated
fi | ||
|
||
#save the credentials to the account conf file. | ||
_saveaccountconf_mutable KINGHOST_Username "$KINGHOST_Username" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
dnsapi/dns_kinghost.sh
Outdated
return 1 | ||
fi | ||
|
||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ;
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
dnsapi/dns_kinghost.sh
Outdated
|
||
KINGHOST_Password="${KINGHOST_Password:-$(_readaccountconf_mutable KINGHOST_Password)}" | ||
KINGHOST_Username="${KINGHOST_Username:-$(_readaccountconf_mutable KINGHOST_Username)}" | ||
if [ -z "$KINGHOST_Password" ] || [ -z "$KINGHOST_Username" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reduce the indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
why not check the CI errors here: https://travis-ci.org/Neilpang/acme.sh/jobs/358428399 |
i don't knew shfmt utility until now. Installing and testing here |
Hi, what is dns_infraws.sh in your PR ? |
Hi @Neilpang |
kinghost.com.br is one of the biggest registrars/web hosts in Brazil and the very first on this country to officially support letsencrypt! =)