From b92ef2e2b14af4faecc1040e083fd3add406b7af Mon Sep 17 00:00:00 2001 From: gyurix Date: Wed, 5 Nov 2025 09:17:56 +0100 Subject: [PATCH] Refactor start.letsencrypt.sh to correct curl command syntax and improve certificate issuance logic --- start.letsencrypt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start.letsencrypt.sh b/start.letsencrypt.sh index a37a0fd..3f5a2f4 100755 --- a/start.letsencrypt.sh +++ b/start.letsencrypt.sh @@ -55,7 +55,7 @@ create_json() { start_letsencrypt() { cd /root if [ "$LETSENCRYPT_INSTALLED" != "true" ]; then - curl https://get.acme.sh | sh -s email=$EMAIL + curl https://get.acme.sh | | sh -s -- --home /acme.sh/$DOMAIN email=$EMAIL LETSENCRYPT_INSTALLED=true fi @@ -65,8 +65,8 @@ start_letsencrypt() { if [ "$ISSUER" == "$SUBJECT" ]; then echo "Self signed certificate found" sh /root/.acme.sh/acme.sh $L_S $EK $EHK --issue --standalone --keylength 4096 -d $DOMAIN --cert-file /acme.sh/$DOMAIN/cert.pem --key-file /acme.sh/$DOMAIN/key.pem --fullchain-file /acme.sh/$DOMAIN/fullchain.pem >$LOG_FILE 2>&1 - else - sh /root/.acme.sh/acme.sh $L_S $EK $EHK --renew --standalone --keylength 4096 -d $DOMAIN --cert-file /acme.sh/$DOMAIN/cert.pem --key-file /acme.sh/$DOMAIN/key.pem --fullchain-file /acme.sh/$DOMAIN/fullchain.pem >$LOG_FILE 2>&1 + else sh /root/.acme.sh/acme.sh $L_S $EK $EHK --renew --standalone --keylength 4096 -d $DOMAIN --cert-file /acme.sh/$DOMAIN/cert.pem --key-file /acme.sh/$DOMAIN/key.pem --fullchain-file /acme.sh/$DOMAIN/fullchain.pem >$LOG_FILE 2>&1 + fi else sh /root/.acme.sh/acme.sh $L_S $EK $EHK --issue --standalone --keylength 4096 -d $DOMAIN --cert-file /acme.sh/$DOMAIN/cert.pem --key-file /acme.sh/$DOMAIN/key.pem --fullchain-file /acme.sh/$DOMAIN/fullchain.pem >$LOG_FILE 2>&1