From 44cf6ad4b84ebea1b1b0442387dd9f5e0a783e21 Mon Sep 17 00:00:00 2001 From: hiddify Date: Sun, 5 Mar 2023 15:17:40 +0100 Subject: [PATCH] fix: bug in acme.sh that waits 10 minute for CA and retry --- acme.sh/install.sh | 2 +- acme.sh/run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acme.sh/install.sh b/acme.sh/install.sh index b493bbbdf..58226e0b9 100644 --- a/acme.sh/install.sh +++ b/acme.sh/install.sh @@ -7,6 +7,6 @@ rm -rf /opt/hiddify/ --config-home /opt/hiddify-config/acme.sh/lib/data \ --cert-home /opt/hiddify-config/acme.sh/lib/certs - +sed -i 's|_sleep_overload_retry_sec=$_retryafter|_sleep_overload_retry_sec=$_retryafter; if [[ "$_retryafter" > 20 ]];then return 10; fi|g' lib/acme.sh mkdir -p ../ssl/ \ No newline at end of file diff --git a/acme.sh/run.sh b/acme.sh/run.sh index 35203bb53..b24e7cc81 100644 --- a/acme.sh/run.sh +++ b/acme.sh/run.sh @@ -37,9 +37,9 @@ for DOMAIN in $DOMAINS; do fi # --server letsencrypt - ./lib/acme.sh --issue --standalone -d $DOMAIN --log $(pwd)/../log/system/acme.log $flags --server letsencrypt --pre-hook 'kill -9 $(lsof -t -i:80)' + ./lib/acme.sh --issue --standalone -d $DOMAIN --log $(pwd)/../log/system/acme.log $flags --server letsencrypt --pre-hook "kill -9 $(lsof -t -i:80) || echo 'nothing to kill'" #if [[ $? != 130 && $? != 0 ]];then - ./lib/acme.sh --issue --standalone -d $DOMAIN --log $(pwd)/../log/system/acme.log $flags --pre-hook 'kill -9 $(lsof -t -i:80)' + ./lib/acme.sh --issue --standalone -d $DOMAIN --log $(pwd)/../log/system/acme.log $flags --pre-hook "kill -9 $(lsof -t -i:80) || echo 'nothing to kill'" #fi ./lib/acme.sh --installcert -d $DOMAIN \ --fullchainpath $ssl_cert_path/$DOMAIN.crt \