修复acme
This commit is contained in:
parent
09e4e01f67
commit
ecd2ef80fd
@ -1,16 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
declare mail
|
if [[ ! -d "${HOME}/.acme.sh" ]];then
|
||||||
declare domain
|
declare mail
|
||||||
declare domain_str=''
|
declare domain
|
||||||
read -p "请输入用来申请域名的邮箱:" mail
|
read -p "请输入用来申请域名的邮箱:" mail
|
||||||
if [[ $mail =~ "\w+@\w+\.[a-z]+" ]];then
|
if [[ $mail =~ "\w+@\w+\.[a-z]+" ]];then
|
||||||
echo "邮箱不合法"
|
echo "邮箱不合法"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "请输入需要申请SSL证书的域名"
|
echo "请输入需要申请SSL证书的域名"
|
||||||
while(1);do
|
while(1);do
|
||||||
read -p "不输入退出添加:" domain
|
read -p "不输入退出添加:" domain
|
||||||
if [[ -z $domain ]];then
|
if [[ -z $domain ]];then
|
||||||
break
|
break
|
||||||
@ -19,7 +19,12 @@ while(1);do
|
|||||||
exit
|
exit
|
||||||
domain_str="$domain_str -d $domain"
|
domain_str="$domain_str -d $domain"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
curl https://get.acme.sh | sh -s "email=$mail"
|
||||||
|
fi
|
||||||
|
|
||||||
|
declare domain_str=''
|
||||||
if [[ -z $domain_str ]]; then
|
if [[ -z $domain_str ]]; then
|
||||||
echo "需要添加的域名不能为空"
|
echo "需要添加的域名不能为空"
|
||||||
exit
|
exit
|
||||||
@ -30,10 +35,6 @@ read "1.http验证"
|
|||||||
read "2.dns验证"
|
read "2.dns验证"
|
||||||
read -p "请选择验证模式" pick_mode
|
read -p "请选择验证模式" pick_mode
|
||||||
|
|
||||||
if [[ ! -d "${HOME}/.acme.sh" ]];then
|
|
||||||
curl https://get.acme.sh | sh -s "email=$mail"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $pick_mode in
|
case $pick_mode in
|
||||||
'1')
|
'1')
|
||||||
declare pick_start
|
declare pick_start
|
||||||
@ -60,6 +61,7 @@ case $pick_mode in
|
|||||||
|
|
||||||
case ${mode_arr[$pick_mode]} in
|
case ${mode_arr[$pick_mode]} in
|
||||||
'TXT记录')
|
'TXT记录')
|
||||||
|
declare domain
|
||||||
declare $log_output=$(acme.sh --issue --dns $domain_str --yes-I-know-dns-manual-mode-enough-go-ahead-please)
|
declare $log_output=$(acme.sh --issue --dns $domain_str --yes-I-know-dns-manual-mode-enough-go-ahead-please)
|
||||||
declare domain=$( echo "$log_output" | grep "Domain:" | awk -F ": " '{print $2}')
|
declare domain=$( echo "$log_output" | grep "Domain:" | awk -F ": " '{print $2}')
|
||||||
declare txt_value=$(echo "$log_output" | grep "TXT value:" | awk -F ": " '{print $2}')
|
declare txt_value=$(echo "$log_output" | grep "TXT value:" | awk -F ": " '{print $2}')
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
declare pick
|
declare pick
|
||||||
|
declare path_script=$1
|
||||||
echo "========Other========"
|
echo "========Other========"
|
||||||
echo "1.开启BBR"
|
echo "1.开启BBR"
|
||||||
echo "2.更换系统语言"
|
echo "2.更换系统语言"
|
||||||
|
Loading…
Reference in New Issue
Block a user