mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-25 14:41:40 +00:00
fix issue: do not re-generate domain key when call renew command
This commit is contained in:
parent
137f5f8b78
commit
bb2294e761
10
le.sh
10
le.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VER=1.1.1
|
VER=1.1.2
|
||||||
PROJECT="https://github.com/Neilpang/le"
|
PROJECT="https://github.com/Neilpang/le"
|
||||||
|
|
||||||
DEFAULT_CA="https://acme-v01.api.letsencrypt.org"
|
DEFAULT_CA="https://acme-v01.api.letsencrypt.org"
|
||||||
@ -104,7 +104,10 @@ createDomainKey() {
|
|||||||
fi
|
fi
|
||||||
_initpath $domain
|
_initpath $domain
|
||||||
|
|
||||||
if [ -f "$CERT_KEY_PATH" ] && ! [ "$FORCE" ] ; then
|
if [ ! -f "$CERT_KEY_PATH" ] || ( [ "$FORCE" ] && ! [ "$IS_RENEW" ] ); then
|
||||||
|
#generate account key
|
||||||
|
openssl genrsa $length > "$CERT_KEY_PATH"
|
||||||
|
else
|
||||||
if [ "$IS_RENEW" ] ; then
|
if [ "$IS_RENEW" ] ; then
|
||||||
_info "Domain key exists, skip"
|
_info "Domain key exists, skip"
|
||||||
return 0
|
return 0
|
||||||
@ -113,9 +116,6 @@ createDomainKey() {
|
|||||||
_err "Set FORCE=1, and try again."
|
_err "Set FORCE=1, and try again."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
#generate account key
|
|
||||||
openssl genrsa $length > "$CERT_KEY_PATH"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user