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