mirror of https://github.com/wulabing/Xray_onekey
1.1.0 证书更新逻辑优化
parent
b0aec4abce
commit
c8c27bcf38
|
@ -516,6 +516,7 @@ old_config_exist_check(){
|
|||
[yY][eE][sS]|[yY])
|
||||
echo -e "${OK} ${Green} 已保留旧配置 ${Font}"
|
||||
old_config_status="on"
|
||||
port=$(info_extraction '\"port\"')
|
||||
;;
|
||||
*)
|
||||
rm -rf $v2ray_qr_config_file
|
||||
|
@ -608,7 +609,7 @@ nginx_process_disabled(){
|
|||
# judge "rc.local 配置"
|
||||
#}
|
||||
acme_cron_update(){
|
||||
[ ! -f ${ssl_update_file} ] && wget -P --no-check-certificate /usr/bin "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/ssl_update.sh"
|
||||
wget -P --no-check-certificate /usr/bin "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/ssl_update.sh"
|
||||
if [[ "${ID}" == "centos" ]];then
|
||||
# sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \
|
||||
# &> /dev/null" /var/spool/cron/root
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
v2ray_qr_config_file="/usr/local/vmess_qr.json"
|
||||
domain=$(grep '\"add\"' $v2ray_qr_config_file | awk -F '"' '{print $4}')
|
||||
|
||||
systemctl stop nginx &> /dev/null
|
||||
sleep 2
|
||||
sleep 1
|
||||
"/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" &> /dev/null
|
||||
sleep 2
|
||||
"/root/.acme.sh"/acme.sh --installcert -d ${domain} --fullchainpath /data/v2ray.crt --keypath /data/v2ray.key --ecc
|
||||
sleep 1
|
||||
systemctl start nginx &> /dev/null
|
||||
|
|
Loading…
Reference in New Issue