修改nginx和增加了acme的调用
This commit is contained in:
parent
0f0a8edc6c
commit
6555544668
@ -1,6 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
declare pick_mode=$1
|
||||||
declare domain_str=$2
|
declare domain_str=$2
|
||||||
|
if ! [[ $pick_mode == "nginx" ]]; then
|
||||||
|
pick_mode=""
|
||||||
|
domain_str=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if ! command -v socat &> /dev/null; then
|
if ! command -v socat &> /dev/null; then
|
||||||
if [[ -f "/usr/bin/apt-get" ]];then
|
if [[ -f "/usr/bin/apt-get" ]];then
|
||||||
@ -51,7 +56,7 @@ if [[ $domain_str ]];then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare pick_mode
|
|
||||||
echo "1.http验证"
|
echo "1.http验证"
|
||||||
echo "2.dns验证"
|
echo "2.dns验证"
|
||||||
read -p "请选择验证模式:" pick_mode
|
read -p "请选择验证模式:" pick_mode
|
||||||
|
@ -50,6 +50,7 @@ case $pick in
|
|||||||
ssl_certificate_key="${HOME}/.acme.sh/${ssl_domain}_ecc/${ssl_domain}.key"
|
ssl_certificate_key="${HOME}/.acme.sh/${ssl_domain}_ecc/${ssl_domain}.key"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
echo ""
|
||||||
declare ssl_domain=""
|
declare ssl_domain=""
|
||||||
for i in ${domain} ; do
|
for i in ${domain} ; do
|
||||||
if ! [[ $i =~ [\w\.]+ ]]; then
|
if ! [[ $i =~ [\w\.]+ ]]; then
|
||||||
@ -58,7 +59,7 @@ case $pick in
|
|||||||
fi
|
fi
|
||||||
ssl_domain="${ssl_domain} -d ${i}"
|
ssl_domain="${ssl_domain} -d ${i}"
|
||||||
done
|
done
|
||||||
bash "${path_script}/Config/Web/acme.sh"
|
bash "${path_script}/Config/Web/acme.sh" "nginx" "${ssl_domain}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user