Moved acme binary from /root/.acme.sh/ into /root/acme.sh/

This commit is contained in:
Samuel Huang
2023-09-05 19:21:09 +10:00
parent 4d8acd83eb
commit 5c37620ceb
2 changed files with 4 additions and 4 deletions

View File

@@ -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 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; 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 site-ssl.conf.tpl /etc/nginx/http.d/
COPY grpc.tpl /etc/nginx/http.d/ COPY grpc.tpl /etc/nginx/http.d/

6
run.sh
View File

@@ -92,8 +92,8 @@ if [ -n "${HOOKURL}" ]; then
curl -sSL "$URL" curl -sSL "$URL"
echo echo
done done
echo "Wait 10s for hook updates..." echo "Wait 30s for hook updates..."
sleep 10 sleep 30
fi fi
if [ -n "${CERTDOMAIN}" ]; then 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" ] while [ ! -f "/root/.acme.sh/${DOMAIN}/fullchain.cer" ] || [ ! -f "/root/.acme.sh/${DOMAIN}/${DOMAIN}.key" ]
do do
echo "Requesting TLS cert for ${DOMAIN} ..." 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++)) ((TRY++))
if [ "${TRY}" -ge 3 ]; then if [ "${TRY}" -ge 3 ]; then
echo "Requesting TLS cert for ${DOMAIN} failed. Check log please." echo "Requesting TLS cert for ${DOMAIN} failed. Check log please."