From e9efd85c424d77c051a5c69814c4b805efc1e812 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Tue, 2 Feb 2021 18:02:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 21283bc..c846ebd 100644 --- a/install.sh +++ b/install.sh @@ -699,18 +699,20 @@ handleNginx() { # 定时任务更新tls证书 installCronTLS() { echoContent skyBlue "\n进度 $1/${totalProgress} : 添加定时维护证书" - if crontab -l | grep -v grep | grep -q '/etc/v2ray-agent/install.sh'; then + 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 + local cronResult=$(cat /etc/v2ray-agent/backup_crontab.cron|uniq) + echo "${cronResult}" > /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 @@ -3098,7 +3100,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.3.13" + echoContent green "当前版本:v2.3.14" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:七合一共存脚本" echoContent red "=============================================================="