From eace3851bab369f6c9c58d9295bff1ebe54633d5 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:25:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=AF=81=E4=B9=A6=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 44aaf9a8..0958b50d 100644 --- a/install.sh +++ b/install.sh @@ -1754,11 +1754,13 @@ installTLS() { fi else - echoContent yellow " ---> 如未过期或者自定义证书请选择[n]\n" - read -r -p "是否重新安装?[y/n]:" reInstallStatus - if [[ "${reInstallStatus}" == "y" ]]; then - rm -rf /etc/v2ray-agent/tls/* - installTLS "$1" + if [[ -d "$HOME/.acme.sh/${tlsDomain}_ecc" && -f "$HOME/.acme.sh/${tlsDomain}_ecc/${tlsDomain}.key" && -f "$HOME/.acme.sh/${tlsDomain}_ecc/${tlsDomain}.cer" ]] || [[ "${installedDNSAPIStatus}" == "true" ]]; then + echoContent yellow " ---> 如未过期或者自定义证书请选择[n]\n" + read -r -p "是否重新安装?[y/n]:" reInstallStatus + if [[ "${reInstallStatus}" == "y" ]]; then + rm -rf /etc/v2ray-agent/tls/* + installTLS "$1" + fi fi fi @@ -2056,6 +2058,8 @@ renewalTLS() { else echoContent green " ---> 证书有效" fi + elif [[ -f "/etc/v2ray-agent/tls/${tlsDomain}.crt" && -f "/etc/v2ray-agent/tls/${tlsDomain}.key" && -n $(cat "/etc/v2ray-agent/tls/${tlsDomain}.crt") ]]; then + echoContent yellow " ---> 检测到使用自定义证书,无法执行renew操作。" else echoContent red " ---> 未安装" fi