From ace05e68e31dfed2160a1fb92c83f0d0eba41bbb Mon Sep 17 00:00:00 2001 From: Kenny Yang <45874689+shakenny@users.noreply.github.com> Date: Thu, 23 May 2024 09:42:50 +0800 Subject: [PATCH] Delete vps/auto_cert_bot.sh --- vps/auto_cert_bot.sh | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 vps/auto_cert_bot.sh diff --git a/vps/auto_cert_bot.sh b/vps/auto_cert_bot.sh deleted file mode 100644 index 907e1e3..0000000 --- a/vps/auto_cert_bot.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# 切换到一个一致的目录(例如,家目录) -cd ~ || exit - -# 下载并使脚本可执行 -wget -O ~/.auto_cert_renewal.sh https://raw.githubusercontent.com/kejilion/sh/main/auto_cert_renewal.sh -chmod +x ~/.auto_cert_renewal.sh - -# 设置定时任务字符串 -cron_job="0 0 * * * ~/.auto_cert_renewal.sh" - -# 检查是否存在相同的定时任务 -existing_cron=$(crontab -l 2>/dev/null | grep -F "$cron_job") - -# 如果不存在,则添加定时任务 -if [ -z "$existing_cron" ]; then - (crontab -l 2>/dev/null; echo "$cron_job") | crontab - - echo "续签任务已添加" -else - echo "续签任务已存在,无需添加" -fi