From cf0c23049c8554a792f94e8583ea8ed36fc9ab95 Mon Sep 17 00:00:00 2001 From: rajcz Date: Fri, 3 Jun 2016 12:35:39 +0200 Subject: [PATCH 1/3] Added new parameter dnssleep Added new parametr dnssleep for better handling sleep time after succesful insert of records via dns api --- acme.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 83ad3d2a..ebdd6edb 100755 --- a/acme.sh +++ b/acme.sh @@ -1371,8 +1371,8 @@ issue() { fi if [ "$dnsadded" = '1' ] ; then - _info "Sleep 60 seconds for the txt records to take effect" - sleep 60 + _info "Sleep $dnssleep seconds for the txt records to take effect" + sleep $dnssleep fi _debug "ok, let's start to verify" @@ -2163,6 +2163,7 @@ Parameters: --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. + --dnssleep # Number of seconds for sleep (for reload dns cache etc.), after succesful insert dns records via 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. @@ -2359,6 +2360,10 @@ _process() { _webroot="$_webroot,$wvalue" fi ;; + --dnssleep + dnssleep="$2" + shift + ;; --keylength|-k) _keylength="$2" accountkeylength="$2" From 407711a885f237ba5e04081295a0499e60b79ccf Mon Sep 17 00:00:00 2001 From: rajcz Date: Fri, 3 Jun 2016 16:59:06 +0200 Subject: [PATCH 2/3] Update acme.sh --- acme.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index ebdd6edb..21070cc0 100755 --- a/acme.sh +++ b/acme.sh @@ -1131,6 +1131,7 @@ issue() { _savedomainconf "Le_Domain" "$Le_Domain" _savedomainconf "Le_Alt" "$Le_Alt" _savedomainconf "Le_Webroot" "$Le_Webroot" + _savedomainconf "dnssleep" "$dnssleep" _savedomainconf "Le_Keylength" "$Le_Keylength" if [ "$Le_Alt" = "no" ] ; then @@ -2361,7 +2362,12 @@ _process() { fi ;; --dnssleep - dnssleep="$2" + re='^[0-9]+$' + if ! [[ $2 =~ $re ]] ; then + dnssleep="60" + else + dnssleep="$2" + fi shift ;; --keylength|-k) From d9f0ec9940a112192f45ec390e54c845974c200e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ond=C5=99ej?= Date: Wed, 8 Jun 2016 11:42:44 +0200 Subject: [PATCH 3/3] Fixed dnssleep parametr - and added to renew conf file --- acme.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/acme.sh b/acme.sh index 21070cc0..9318459d 100755 --- a/acme.sh +++ b/acme.sh @@ -1105,7 +1105,8 @@ issue() { Le_RealCACertPath="$7" Le_ReloadCmd="$8" Le_RealFullChainPath="$9" - + dnssleep="${10}" + #remove these later. if [ "$Le_Webroot" = "dns-cf" ] ; then Le_Webroot="dns_cf" @@ -1620,7 +1621,7 @@ renew() { fi IS_RENEW="1" - issue "$Le_Webroot" "$Le_Domain" "$Le_Alt" "$Le_Keylength" "$Le_RealCertPath" "$Le_RealKeyPath" "$Le_RealCACertPath" "$Le_ReloadCmd" "$Le_RealFullChainPath" + issue "$Le_Webroot" "$Le_Domain" "$Le_Alt" "$Le_Keylength" "$Le_RealCertPath" "$Le_RealKeyPath" "$Le_RealCACertPath" "$Le_ReloadCmd" "$Le_RealFullChainPath" "$dnssleep" local res=$? IS_RENEW="" @@ -2164,7 +2165,7 @@ Parameters: --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. - --dnssleep # Number of seconds for sleep (for reload dns cache etc.), after succesful insert dns records via dns api. + --dnssleep Number of seconds for sleep (for reload dns cache etc.), after succesful insert dns records via 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. @@ -2235,6 +2236,7 @@ _process() { _accountkey="" _certhome="" _httpport="" + dnssleep="60" while [ ${#} -gt 0 ] ; do case "${1}" in @@ -2361,13 +2363,13 @@ _process() { _webroot="$_webroot,$wvalue" fi ;; - --dnssleep + --dnssleep) re='^[0-9]+$' - if ! [[ $2 =~ $re ]] ; then - dnssleep="60" + if ! [[ "$2" =~ $re ]] ; then + dnssleep="60" else dnssleep="$2" - fi + fi shift ;; --keylength|-k) @@ -2456,8 +2458,8 @@ _process() { case "${_CMD}" in install) install ;; uninstall) uninstall ;; - issue) - issue "$_webroot" "$_domain" "$_altdomains" "$_keylength" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath" + issue) + issue "$_webroot" "$_domain" "$_altdomains" "$_keylength" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath" "$dnssleep" ;; installcert) installcert "$_domain" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath"