修改nginx和增加了acme的调用

This commit is contained in:
lsy 2024-09-25 15:23:05 +08:00
parent 0f0a8edc6c
commit 6555544668
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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