From 0fd45718c333e75f1b23ccd1ec317ea5adaf219c Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 19 Mar 2021 23:03:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AF=81=E4=B9=A6=E6=A3=80=E6=B5=8B=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3e14cd7..909598c 100644 --- a/install.sh +++ b/install.sh @@ -730,7 +730,7 @@ renewalTLS() { echoContent skyBlue "\n进度 1/1 : 更新证书" 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}.key | sed -n '7,6p' | awk '{print $2" "$3" "$4" "$5}') + modifyTime=$(stat $HOME/.acme.sh/${currentHost}_ecc/${currentHost}.cer | sed -n '7,6p' | awk '{print $2" "$3" "$4" "$5}') modifyTime=$(date +%s -d "${modifyTime}") currentTime=$(date +%s) @@ -3505,7 +3505,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.4.4" + echoContent green "当前版本:v2.4.5" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本" echoContent red "==============================================================" From 026b9daefcb2a899d087ab49909efdf500929faa Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 19 Mar 2021 23:21:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/install.sh b/install.sh index 909598c..add148a 100644 --- a/install.sh +++ b/install.sh @@ -701,28 +701,11 @@ handleNginx() { # 定时任务更新tls证书 installCronTLS() { echoContent skyBlue "\n进度 $1/${totalProgress} : 添加定时维护证书" - if ! crontab -l | grep -v grep | grep -q '/etc/v2ray-agent/install.sh'; then - crontab -l >/etc/v2ray-agent/backup_crontab.cron - if grep >/etc/v2ray-agent/backup_crontab.cron - crontab /etc/v2ray-agent/backup_crontab.cron - fi - - if [[ -n $(crontab -l | grep -v grep | grep '/etc/v2ray-agent/install.sh') ]]; then - - crontab -l | uniq | awk '/./ {print}' >>/etc/v2ray-agent/backup_crontab.cron - local crontabResult=$(cat /etc/v2ray-agent/backup_crontab.cron | uniq | awk '/./ {print}') - echo "${crontabResult}" >/etc/v2ray-agent/backup_crontab.cron - crontab /etc/v2ray-agent/backup_crontab.cron - echoContent green " ---> 添加定时维护证书成功" - else - echo "30 1 * * * /bin/bash /etc/v2ray-agent/install.sh RenewTLS" >>/etc/v2ray-agent/backup_crontab.cron - crontab /etc/v2ray-agent/backup_crontab.cron - echoContent green " ---> 添加定时维护证书成功" - fi + crontab -l >/etc/v2ray-agent/backup_crontab.cron + sed '/v2ray-agent/d;/acme.sh/d' /etc/v2ray-agent/backup_crontab.cron >/etc/v2ray-agent/backup_crontab.cron + echo "30 1 * * * /bin/bash /etc/v2ray-agent/install.sh RenewTLS" >>/etc/v2ray-agent/backup_crontab.cron + crontab /etc/v2ray-agent/backup_crontab.cron + echoContent green " ---> 添加定时维护证书成功" } # 更新证书