Missing registered email if statement and fixing domains path also.
This commit is contained in:
@@ -6,7 +6,13 @@ start_letsencrypt() {
|
|||||||
|
|
||||||
mkdir -p /acme.sh/$DOMAIN/ ;
|
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 ;
|
#mkdir -p /acme.sh/$DOMAIN/ecc-certs ;
|
||||||
|
|
||||||
@@ -20,6 +26,7 @@ if [ -n "$LETSENCRYPT_FILE" ] ; then
|
|||||||
start_letsencrypt;
|
start_letsencrypt;
|
||||||
rm $LETSENCRYPT_FILE;
|
rm $LETSENCRYPT_FILE;
|
||||||
else
|
else
|
||||||
|
cd /domains
|
||||||
for i in `ls` ; do
|
for i in `ls` ; do
|
||||||
DOMAIN=$(jq -r .DOMAIN $i) ;
|
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
|
if [[ -f /acme.sh/$DOMAIN/key.pem && -f /acme.sh/$DOMAIN/fullchain.pem && -f /acme.sh/$DOMAIN/cert.pem ]] ; then
|
||||||
|
Reference in New Issue
Block a user