From 054cb72e555fc0ff773407a02f64ba39558adf74 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 13 Jun 2016 14:49:00 +0800 Subject: [PATCH] minor, save days only when necessary --- acme.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/acme.sh b/acme.sh index b52a88da..693b2534 100755 --- a/acme.sh +++ b/acme.sh @@ -1142,8 +1142,9 @@ issue() { if [ -z "$Le_HTTPPort" ] ; then Le_HTTPPort=80 - fi - _savedomainconf "Le_HTTPPort" "$Le_HTTPPort" + else + _savedomainconf "Le_HTTPPort" "$Le_HTTPPort" + fi netprc="$(_ss "$Le_HTTPPort" | grep "$Le_HTTPPort")" if [ "$netprc" ] ; then @@ -1574,9 +1575,9 @@ issue() { if [ -z "$Le_RenewalDays" ] || [ "$Le_RenewalDays" -lt "0" ] || [ "$Le_RenewalDays" -gt "80" ] ; then Le_RenewalDays=80 - fi - - _savedomainconf "Le_RenewalDays" "$Le_RenewalDays" + else + _savedomainconf "Le_RenewalDays" "$Le_RenewalDays" + fi Le_NextRenewTime=$(_math $Le_CertCreateTime + $Le_RenewalDays \* 24 \* 60 \* 60) _savedomainconf "Le_NextRenewTime" "$Le_NextRenewTime"