Missing registered email if statement and fixing domains path also.

This commit is contained in:
Gyorgy Berenyi
2021-10-06 05:45:14 +00:00
parent 7c39356bfa
commit e3c3f00e06

View File

@@ -6,7 +6,13 @@ start_letsencrypt() {
mkdir -p /acme.sh/$DOMAIN/ ;
acme.sh --register-account -m $email --issue --standalone --keylength 4096 -d $DOMAIN --cert-file /acme.sh/$DOMAIN/cert.pem --key-file /acme.sh/$DOMAIN/key.pem --fullchain-file /acme.sh/$DOMAIN/fullchain.pem ;
acme.sh --register-account -m $email;
if acme.sh --register-account -m $email | grep "Already registered" ; then
acme.sh -m $email --issue --standalone --keylength 4096 -d $DOMAIN --cert-file /acme.sh/$DOMAIN/cert.pem --key-file /acme.sh/$DOMAIN/key.pem --fullchain-file /acme.sh/$DOMAIN/fullchain.pem ;
fi
#mkdir -p /acme.sh/$DOMAIN/ecc-certs ;
@@ -20,6 +26,7 @@ if [ -n "$LETSENCRYPT_FILE" ] ; then
start_letsencrypt;
rm $LETSENCRYPT_FILE;
else
cd /domains
for i in `ls` ; do
DOMAIN=$(jq -r .DOMAIN $i) ;
if [[ -f /acme.sh/$DOMAIN/key.pem && -f /acme.sh/$DOMAIN/fullchain.pem && -f /acme.sh/$DOMAIN/cert.pem ]] ; then