Minor changes

This commit is contained in:
2021-09-07 11:18:22 +00:00
parent 7732f9916d
commit 70f7f45c3a

View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
DATE=`date +%F-%H-%M-%S`
cd /domains cd /domains
email=$EMAIL email=$EMAIL
@@ -26,7 +28,9 @@ else
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 ;
if [ find /acme.sh/$DOMAIN/ -type f -newermt "$(date '+%Y-%m-%d %H:%M:%S' -d '1 hour ago')" ]; then
touch /acme.sh/$DOMAIN/renew_certificate; touch /acme.sh/$DOMAIN/renew_certificate;
fi
else else
start_letsencrypt; start_letsencrypt;
touch /acme.sh/$DOMAIN/new_certificate; touch /acme.sh/$DOMAIN/new_certificate;