Checking some file creating path and some cycle end
This commit is contained in:
@@ -22,14 +22,15 @@ start_letsencrypt() {
|
||||
LETSENCRYPT_FILE=$(find /acme.sh/ -type f -name letsencrypt);
|
||||
if [ -n "$LETSENCRYPT_FILE" ] ; then
|
||||
DOMAIN=$(jq -r .DOMAIN $LETSENCRYPT_FILE) ;
|
||||
start_letsencrypt;
|
||||
start_letsencryp $DOMAIN;
|
||||
rm $LETSENCRYPT_FILE;
|
||||
touch /acme.sh/$DOMAIN/renew_certificate;
|
||||
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
|
||||
start_letsencrypt ;
|
||||
start_letsencrypt $DOMAIN;
|
||||
touch /acme.sh/$DOMAIN/renew_certificate;
|
||||
else
|
||||
start_letsencrypt;
|
||||
@@ -39,7 +40,10 @@ else
|
||||
else
|
||||
while [[ ! -f /acme.sh/$DOMAIN/key.pem || ! -f /acme.sh/$DOMAIN/fullchain.pem || ! -f /acme.sh/$DOMAIN/cert.pem ]] ; do
|
||||
sleep 10;
|
||||
start_letsencrypt ;
|
||||
start_letsencrypt $DOMAIN;
|
||||
if [[ -f /acme.sh/$DOMAIN/key.pem && -f /acme.sh/$DOMAIN/fullchain.pem && -f /acme.sh/$DOMAIN/cert.pem ]] ; then
|
||||
touch /acme.sh/$DOMAIN/new_certificate;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user