From 65555446689776bfa9ced6e243a15241b71412f7 Mon Sep 17 00:00:00 2001 From: lsy Date: Wed, 25 Sep 2024 15:23:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9nginx=E5=92=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86acme=E7=9A=84=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Web/acme.sh | 9 +++++++-- Config/Web/nginx.sh | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Config/Web/acme.sh b/Config/Web/acme.sh index 50c1a33..ef3bf29 100644 --- a/Config/Web/acme.sh +++ b/Config/Web/acme.sh @@ -1,6 +1,11 @@ #!/bin/bash - +declare pick_mode=$1 declare domain_str=$2 +if ! [[ $pick_mode == "nginx" ]]; then + pick_mode="" + domain_str="" +fi + if ! command -v socat &> /dev/null; then if [[ -f "/usr/bin/apt-get" ]];then @@ -51,7 +56,7 @@ if [[ $domain_str ]];then fi fi -declare pick_mode + echo "1.http验证" echo "2.dns验证" read -p "请选择验证模式:" pick_mode diff --git a/Config/Web/nginx.sh b/Config/Web/nginx.sh index 6a9484e..acb70e2 100644 --- a/Config/Web/nginx.sh +++ b/Config/Web/nginx.sh @@ -50,6 +50,7 @@ case $pick in ssl_certificate_key="${HOME}/.acme.sh/${ssl_domain}_ecc/${ssl_domain}.key" fi else + echo "" declare ssl_domain="" for i in ${domain} ; do if ! [[ $i =~ [\w\.]+ ]]; then @@ -58,7 +59,7 @@ case $pick in fi ssl_domain="${ssl_domain} -d ${i}" done - bash "${path_script}/Config/Web/acme.sh" + bash "${path_script}/Config/Web/acme.sh" "nginx" "${ssl_domain}" fi