Skip to content

Commit 42f934f

Browse files
authored
修复证书签发失败导致后续申请时域名合法性校验失败问题
1 parent a3bb1ac commit 42f934f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x-ui.sh

+4
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ ssl_cert_issue_standalone() {
501501
~/.acme.sh/acme.sh --issue -d ${domain} --standalone --httpport ${WebPort}
502502
if [ $? -ne 0 ]; then
503503
LOGE "证书申请失败,原因请参见报错信息"
504+
rm -rf ~/.acme.sh/${domain}
504505
exit 1
505506
else
506507
LOGI "证书申请成功,开始安装证书..."
@@ -512,6 +513,7 @@ ssl_cert_issue_standalone() {
512513

513514
if [ $? -ne 0 ]; then
514515
LOGE "证书安装失败,脚本退出"
516+
rm -rf ~/.acme.sh/${domain}
515517
exit 1
516518
else
517519
LOGI "证书安装成功,开启自动更新..."
@@ -585,6 +587,7 @@ ssl_cert_issue_by_cloudflare() {
585587
~/.acme.sh/acme.sh --issue --dns dns_cf -d ${CF_Domain} -d *.${CF_Domain} --log
586588
if [ $? -ne 0 ]; then
587589
LOGE "证书签发失败,脚本退出"
590+
rm -rf ~/.acme.sh/${CF_Domain}
588591
exit 1
589592
else
590593
LOGI "证书签发成功,安装中..."
@@ -594,6 +597,7 @@ ssl_cert_issue_by_cloudflare() {
594597
--fullchain-file /root/cert/fullchain.cer
595598
if [ $? -ne 0 ]; then
596599
LOGE "证书安装失败,脚本退出"
600+
rm -rf ~/.acme.sh/${CF_Domain}
597601
exit 1
598602
else
599603
LOGI "证书安装成功,开启自动更新..."

0 commit comments

Comments
 (0)