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);
|
LETSENCRYPT_FILE=$(find /acme.sh/ -type f -name letsencrypt);
|
||||||
if [ -n "$LETSENCRYPT_FILE" ] ; then
|
if [ -n "$LETSENCRYPT_FILE" ] ; then
|
||||||
DOMAIN=$(jq -r .DOMAIN $LETSENCRYPT_FILE) ;
|
DOMAIN=$(jq -r .DOMAIN $LETSENCRYPT_FILE) ;
|
||||||
start_letsencrypt;
|
start_letsencryp $DOMAIN;
|
||||||
rm $LETSENCRYPT_FILE;
|
rm $LETSENCRYPT_FILE;
|
||||||
|
touch /acme.sh/$DOMAIN/renew_certificate;
|
||||||
else
|
else
|
||||||
cd /domains
|
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
|
||||||
start_letsencrypt ;
|
start_letsencrypt $DOMAIN;
|
||||||
touch /acme.sh/$DOMAIN/renew_certificate;
|
touch /acme.sh/$DOMAIN/renew_certificate;
|
||||||
else
|
else
|
||||||
start_letsencrypt;
|
start_letsencrypt;
|
||||||
@@ -39,7 +40,10 @@ else
|
|||||||
else
|
else
|
||||||
while [[ ! -f /acme.sh/$DOMAIN/key.pem || ! -f /acme.sh/$DOMAIN/fullchain.pem || ! -f /acme.sh/$DOMAIN/cert.pem ]] ; do
|
while [[ ! -f /acme.sh/$DOMAIN/key.pem || ! -f /acme.sh/$DOMAIN/fullchain.pem || ! -f /acme.sh/$DOMAIN/cert.pem ]] ; do
|
||||||
sleep 10;
|
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
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user