feat(脚本): 优化安装时的tls检查、优化添加账户后不再跳转到查看账户
parent
aa3bd40914
commit
f41fa986a9
14
install.sh
14
install.sh
|
@ -1130,9 +1130,13 @@ renewalTLS() {
|
|||
if [[ -n $1 ]]; then
|
||||
echoContent skyBlue "\n进度 $1/1 : 更新证书"
|
||||
fi
|
||||
local domain=${currentHost}
|
||||
if [[ -z "${currentHost}" && -n "${tlsDomain}" ]];then
|
||||
domain=${tlsDomain}
|
||||
fi
|
||||
|
||||
if [[ -d "$HOME/.acme.sh/${currentHost}_ecc" ]] && [[ -f "$HOME/.acme.sh/${currentHost}_ecc/${currentHost}.key" ]] && [[ -f "$HOME/.acme.sh/${currentHost}_ecc/${currentHost}.cer" ]]; then
|
||||
modifyTime=$(stat "$HOME/.acme.sh/${currentHost}_ecc/${currentHost}.cer" | sed -n '7,6p' | awk '{print $2" "$3" "$4" "$5}')
|
||||
if [[ -d "$HOME/.acme.sh/${domain}_ecc" ]] && [[ -f "$HOME/.acme.sh/${domain}_ecc/${domain}.key" ]] && [[ -f "$HOME/.acme.sh/${domain}_ecc/${domain}.cer" ]]; then
|
||||
modifyTime=$(stat "$HOME/.acme.sh/${domain}_ecc/${domain}.cer" | sed -n '7,6p' | awk '{print $2" "$3" "$4" "$5}')
|
||||
|
||||
modifyTime=$(date +%s -d "${modifyTime}")
|
||||
currentTime=$(date +%s)
|
||||
|
@ -1155,7 +1159,7 @@ renewalTLS() {
|
|||
echoContent yellow " ---> 重新生成证书"
|
||||
handleNginx stop
|
||||
sudo "$HOME/.acme.sh/acme.sh" --cron --home "$HOME/.acme.sh"
|
||||
sudo "$HOME/.acme.sh/acme.sh" --installcert -d "${currentHost}" --fullchainpath /etc/v2ray-agent/tls/"${currentHost}.crt" --keypath /etc/v2ray-agent/tls/"${currentHost}.key" --ecc
|
||||
sudo "$HOME/.acme.sh/acme.sh" --installcert -d "${domain}" --fullchainpath /etc/v2ray-agent/tls/"${domain}.crt" --keypath /etc/v2ray-agent/tls/"${domain}.key" --ecc
|
||||
reloadCore
|
||||
else
|
||||
echoContent green " ---> 证书有效"
|
||||
|
@ -3095,7 +3099,7 @@ addUser() {
|
|||
|
||||
reloadCore
|
||||
echoContent green " ---> 添加完成"
|
||||
showAccounts 1
|
||||
manageAccount 1
|
||||
}
|
||||
|
||||
# 移除用户
|
||||
|
@ -4301,7 +4305,7 @@ menu() {
|
|||
cd "$HOME" || exit
|
||||
echoContent red "\n=============================================================="
|
||||
echoContent green "作者:mack-a"
|
||||
echoContent green "当前版本:v2.5.39"
|
||||
echoContent green "当前版本:v2.5.40"
|
||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||
echoContent green "描述:八合一共存脚本\c"
|
||||
showInstallStatus
|
||||
|
|
Loading…
Reference in New Issue