From c8c27bcf38539830d8a0717e45e9379b444ec6d7 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sun, 16 Feb 2020 00:41:22 +0800 Subject: [PATCH] =?UTF-8?q?1.1.0=20=E8=AF=81=E4=B9=A6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 3 ++- ssl_update.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index a22a0f3..1e46d02 100644 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/ssl_update.sh b/ssl_update.sh index 5057e0f..607baec 100644 --- a/ssl_update.sh +++ b/ssl_update.sh @@ -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