From 7732f9916d20d7f83b68b879d348da16e07a9883 Mon Sep 17 00:00:00 2001 From: gyurix Date: Tue, 7 Sep 2021 12:43:14 +0200 Subject: [PATCH] Minor changes --- start.letsencrypt.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/start.letsencrypt.sh b/start.letsencrypt.sh index b3d9925..6c48d78 100755 --- a/start.letsencrypt.sh +++ b/start.letsencrypt.sh @@ -24,8 +24,13 @@ if [ -n "$LETSENCRYPT_FILE" ] ; then else for i in `ls` ; do DOMAIN=$(jq -r .DOMAIN $i) ; - start_letsencrypt; - touch /acme.sh/$DOMAIN/new_certificate + 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; + else + start_letsencrypt; + touch /acme.sh/$DOMAIN/new_certificate; + fi done ; fi