From 5c37620ceb7eb70d5e90a91b3bdc9d5945c8de3a Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Tue, 5 Sep 2023 19:21:09 +1000 Subject: [PATCH] Moved acme binary from /root/.acme.sh/ into /root/acme.sh/ --- Dockerfile | 2 +- run.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4681386..ff90173 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/ RUN apk add --no-cache bash nginx openssl curl socat jq moreutils RUN cd /root; curl -sSL "https://github.com/acmesh-official/acme.sh/archive/refs/tags/${ACMEVER}.tar.gz"|tar zxvf - -RUN cd /root; mv acme.sh-${ACMEVER} .acme.sh +RUN cd /root; ln -s acme.sh-${ACMEVER} acme.sh; mkdir .acme.sh COPY site-ssl.conf.tpl /etc/nginx/http.d/ COPY grpc.tpl /etc/nginx/http.d/ diff --git a/run.sh b/run.sh index 009217d..d08aa57 100755 --- a/run.sh +++ b/run.sh @@ -92,8 +92,8 @@ if [ -n "${HOOKURL}" ]; then curl -sSL "$URL" echo done - echo "Wait 10s for hook updates..." - sleep 10 + echo "Wait 30s for hook updates..." + sleep 30 fi if [ -n "${CERTDOMAIN}" ]; then @@ -103,7 +103,7 @@ if [ -n "${CERTDOMAIN}" ]; then while [ ! -f "/root/.acme.sh/${DOMAIN}/fullchain.cer" ] || [ ! -f "/root/.acme.sh/${DOMAIN}/${DOMAIN}.key" ] do echo "Requesting TLS cert for ${DOMAIN} ..." - /root/.acme.sh/acme.sh --issue --standalone -d ${DOMAIN} --debug + /root/acme.sh/acme.sh --issue --standalone -d ${DOMAIN} --debug ((TRY++)) if [ "${TRY}" -ge 3 ]; then echo "Requesting TLS cert for ${DOMAIN} failed. Check log please."