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
DATE=`date +%F-%H-%M-%S`
cd /domains
email=$EMAIL
@@ -26,7 +28,9 @@ else
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 ;
touch /acme.sh/$DOMAIN/renew_certificate;
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;
fi
else
start_letsencrypt;
touch /acme.sh/$DOMAIN/new_certificate;