mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 10:27:22 +00:00 
			
		
		
		
	fix compatible for sh. '-' is not allowed in function name.
This commit is contained in:
		
							parent
							
								
									dceb3acace
								
							
						
					
					
						commit
						eccec5f6d5
					
				
							
								
								
									
										15
									
								
								acme.sh
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								acme.sh
									
									
									
									
									
								
							| @ -956,6 +956,17 @@ issue() { | ||||
|   Le_ReloadCmd="$8" | ||||
|   Le_RealFullChainPath="$9" | ||||
|    | ||||
|   #remove these later. | ||||
|   if [[ "$Le_Webroot" == "dns-cf" ]] ; then | ||||
|     Le_Webroot="dns_cf" | ||||
|   fi | ||||
|   if [[ "$Le_Webroot" == "dns-dp" ]] ; then | ||||
|     Le_Webroot="dns_dp" | ||||
|   fi | ||||
|   if [[ "$Le_Webroot" == "dns-cx" ]] ; then | ||||
|     Le_Webroot="dns_cx" | ||||
|   fi | ||||
|    | ||||
|   _initpath $Le_Domain | ||||
| 
 | ||||
|   if [[ -f "$DOMAIN_CONF" ]] ; then | ||||
| @ -1189,7 +1200,7 @@ issue() { | ||||
|             return 1 | ||||
|           fi | ||||
|            | ||||
|           addcommand="$_currentRoot-add" | ||||
|           addcommand="$_currentRoot_add" | ||||
|           if ! _exists $addcommand ; then  | ||||
|             _err "It seems that your api file is not correct, it must have a function named: $addcommand" | ||||
|             return 1 | ||||
| @ -1924,7 +1935,7 @@ Parameters: | ||||
|   --webroot, -w  /path/to/webroot   Specifies the web root folder for web root mode. | ||||
|   --standalone                      Use standalone mode. | ||||
|   --apache                          Use apache mode. | ||||
|   --dns [dns-cf|dns-dp|dns-cx|/path/to/api/file]   Use dns mode or dns api. | ||||
|   --dns [dns_cf|dns_dp|dns_cx|/path/to/api/file]   Use dns mode or dns api. | ||||
|    | ||||
|   --keylength, -k [2048]            Specifies the domain key length: 2048, 3072, 4096, 8192 or ec-256, ec-384. | ||||
|   --accountkeylength, -ak [2048]    Specifies the account key length. | ||||
|  | ||||
| @ -12,7 +12,7 @@ CF_Api="https://api.cloudflare.com/client/v4/" | ||||
| ########  Public functions ##################### | ||||
| 
 | ||||
| #Usage: add  _acme-challenge.www.domain.com   "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" | ||||
| dns-cf-add(){ | ||||
| dns_cf_add(){ | ||||
|   fulldomain=$1 | ||||
|   txtvalue=$2 | ||||
|    | ||||
|  | ||||
| @ -14,7 +14,7 @@ CX_Api="https://www.cloudxns.net/api2" | ||||
| ########  Public functions ##################### | ||||
| 
 | ||||
| #Usage: add  _acme-challenge.www.domain.com   "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" | ||||
| dns-cx-add() { | ||||
| dns_cx_add() { | ||||
|   fulldomain=$1 | ||||
|   txtvalue=$2 | ||||
|    | ||||
|  | ||||
| @ -14,7 +14,7 @@ DP_Api="https://dnsapi.cn" | ||||
| ########  Public functions ##################### | ||||
| 
 | ||||
| #Usage: add  _acme-challenge.www.domain.com   "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" | ||||
| dns-dp-add() { | ||||
| dns_dp_add() { | ||||
|   fulldomain=$1 | ||||
|   txtvalue=$2 | ||||
|    | ||||
|  | ||||
| @ -1,8 +1,8 @@ | ||||
| #!/bin/bash | ||||
| 
 | ||||
| #Here is a sample custom api script. | ||||
| #This file name is "dns-myapi.sh" | ||||
| #So, here must be a method   dns-myapi-add() | ||||
| #This file name is "dns_myapi.sh" | ||||
| #So, here must be a method   dns_myapi-add() | ||||
| #Which will be called by acme.sh to add the txt record to your api system. | ||||
| #returns 0 meanst success, otherwise error. | ||||
| 
 | ||||
| @ -11,7 +11,7 @@ | ||||
| ########  Public functions ##################### | ||||
| 
 | ||||
| #Usage: add   _acme-challenge.www.domain.com   "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" | ||||
| dns-myapi-add() { | ||||
| dns_myapi_add() { | ||||
|   fulldomain=$1 | ||||
|   txtvalue=$2 | ||||
|   _err "Not implemented!" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user