mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-25 14:41:40 +00:00
commit
393d8b9ded
26
acme.sh
26
acme.sh
@ -124,23 +124,19 @@ if [ -t 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
__green() {
|
__green() {
|
||||||
if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then
|
if [ "${__INTERACTIVE}${ACME_NO_COLOR:-0}" = "10" -o "${ACME_FORCE_COLOR}" = "1" ]; then
|
||||||
printf '\033[1;31;32m'
|
printf '\033[1;31;32m%b\033[0m' "$1"
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
printf -- "%b" "$1"
|
printf -- "%b" "$1"
|
||||||
if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then
|
|
||||||
printf '\033[0m'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__red() {
|
__red() {
|
||||||
if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then
|
if [ "${__INTERACTIVE}${ACME_NO_COLOR:-0}" = "10" -o "${ACME_FORCE_COLOR}" = "1" ]; then
|
||||||
printf '\033[1;31;40m'
|
printf '\033[1;31;40m%b\033[0m' "$1"
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
printf -- "%b" "$1"
|
printf -- "%b" "$1"
|
||||||
if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then
|
|
||||||
printf '\033[0m'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_printargs() {
|
_printargs() {
|
||||||
@ -2925,6 +2921,7 @@ _clearupdns() {
|
|||||||
_debug txt "$txt"
|
_debug txt "$txt"
|
||||||
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
|
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
|
||||||
_debug "$d is already verified, skip $vtype."
|
_debug "$d is already verified, skip $vtype."
|
||||||
|
_alias_index="$(_math "$_alias_index" + 1)"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -3775,6 +3772,7 @@ $_authorizations_map"
|
|||||||
_debug d "$d"
|
_debug d "$d"
|
||||||
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
|
if [ "$keyauthorization" = "$STATE_VERIFIED" ]; then
|
||||||
_debug "$d is already verified, skip $vtype."
|
_debug "$d is already verified, skip $vtype."
|
||||||
|
_alias_index="$(_math "$_alias_index" + 1)"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -4602,7 +4600,8 @@ deploy() {
|
|||||||
|
|
||||||
_initpath "$_d" "$_isEcc"
|
_initpath "$_d" "$_isEcc"
|
||||||
if [ ! -d "$DOMAIN_PATH" ]; then
|
if [ ! -d "$DOMAIN_PATH" ]; then
|
||||||
_err "Domain is not valid:'$_d'"
|
_err "The domain '$_d' is not a cert name. You must use the cert name to specify the cert to install."
|
||||||
|
_err "Can not find path:'$DOMAIN_PATH'"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -4629,7 +4628,8 @@ installcert() {
|
|||||||
|
|
||||||
_initpath "$_main_domain" "$_isEcc"
|
_initpath "$_main_domain" "$_isEcc"
|
||||||
if [ ! -d "$DOMAIN_PATH" ]; then
|
if [ ! -d "$DOMAIN_PATH" ]; then
|
||||||
_err "Domain is not valid:'$_main_domain'"
|
_err "The domain '$_main_domain' is not a cert name. You must use the cert name to specify the cert to install."
|
||||||
|
_err "Can not find path:'$DOMAIN_PATH'"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5474,7 +5474,7 @@ Parameters:
|
|||||||
--log-level 1|2 Specifies the log level, default is 1.
|
--log-level 1|2 Specifies the log level, default is 1.
|
||||||
--syslog [0|3|6|7] Syslog level, 0: disable syslog, 3: error, 6: info, 7: debug.
|
--syslog [0|3|6|7] Syslog level, 0: disable syslog, 3: error, 6: info, 7: debug.
|
||||||
|
|
||||||
These parameters are to install the cert to nginx/apache or anyother server after issue/renew a cert:
|
These parameters are to install the cert to nginx/apache or any other server after issue/renew a cert:
|
||||||
|
|
||||||
--cert-file After issue/renew, the cert will be copied to this path.
|
--cert-file After issue/renew, the cert will be copied to this path.
|
||||||
--key-file After issue/renew, the key will be copied to this path.
|
--key-file After issue/renew, the key will be copied to this path.
|
||||||
|
@ -6,7 +6,7 @@ https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode
|
|||||||
|
|
||||||
## 1. Use CloudFlare domain API to automatically issue cert
|
## 1. Use CloudFlare domain API to automatically issue cert
|
||||||
|
|
||||||
First you need to login to your CloudFlare account to get your API key.
|
First you need to login to your CloudFlare account to get your [API key](https://dash.cloudflare.com/profile).
|
||||||
|
|
||||||
```
|
```
|
||||||
export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
@ -454,7 +454,7 @@ The `Infoblox_Creds` and `Infoblox_Server` will be saved in `~/.acme.sh/account.
|
|||||||
First you need to create/obtain API tokens on your [settings panel](https://vscale.io/panel/settings/tokens/).
|
First you need to create/obtain API tokens on your [settings panel](https://vscale.io/panel/settings/tokens/).
|
||||||
|
|
||||||
```
|
```
|
||||||
VSCALE_API_KEY="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
export VSCALE_API_KEY="sdfsdfsdfljlbjkljlkjsdfoiwje"
|
||||||
```
|
```
|
||||||
|
|
||||||
Ok, let's issue a cert now:
|
Ok, let's issue a cert now:
|
||||||
|
@ -316,7 +316,7 @@ _get_root() {
|
|||||||
## (ZoneListResult with continuation token for the next page of results)
|
## (ZoneListResult with continuation token for the next page of results)
|
||||||
## Per https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#dns-limits you are limited to 100 Zone/subscriptions anyways
|
## Per https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#dns-limits you are limited to 100 Zone/subscriptions anyways
|
||||||
##
|
##
|
||||||
_azure_rest GET "https://management.azure.com/subscriptions/$subscriptionId/providers/Microsoft.Network/dnszones?api-version=2017-09-01" "" "$accesstoken"
|
_azure_rest GET "https://management.azure.com/subscriptions/$subscriptionId/providers/Microsoft.Network/dnszones?\$top=500&api-version=2017-09-01" "" "$accesstoken"
|
||||||
# Find matching domain name is Json response
|
# Find matching domain name is Json response
|
||||||
while true; do
|
while true; do
|
||||||
h=$(printf "%s" "$domain" | cut -d . -f $i-100)
|
h=$(printf "%s" "$domain" | cut -d . -f $i-100)
|
||||||
|
@ -92,7 +92,9 @@ dns_he_rm() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# Remove the record
|
# Remove the record
|
||||||
body="email=${HE_Username}&pass=${HE_Password}"
|
username_encoded="$(printf "%s" "${HE_Username}" | _url_encode)"
|
||||||
|
password_encoded="$(printf "%s" "${HE_Password}" | _url_encode)"
|
||||||
|
body="email=${username_encoded}&pass=${password_encoded}"
|
||||||
body="$body&menu=edit_zone"
|
body="$body&menu=edit_zone"
|
||||||
body="$body&hosted_dns_zoneid=$_zone_id"
|
body="$body&hosted_dns_zoneid=$_zone_id"
|
||||||
body="$body&hosted_dns_recordid=$_record_id"
|
body="$body&hosted_dns_recordid=$_record_id"
|
||||||
|
Loading…
Reference in New Issue
Block a user