定时任务判断fix

修复定时更新https证书任务判断逻辑
This commit is contained in:
zzzzzhy 2025-01-17 14:15:24 +08:00 committed by GitHub
parent 0ecc20472a
commit e081fbd92b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
cmd
View File

@ -328,7 +328,7 @@ https_auto() {
fi
new_job="* 6 * * * docker run -it --rm -v $(pwd):/work nginx:alpine sh /work/bin/https renew"
current_crontab=$(crontab -l 2>/dev/null)
if echo "$current_crontab" | grep -v "https renew"; then
if ! echo "$current_crontab" | grep -v "https renew"; then
echo "任务已存在,无需添加。"
else
crontab -l |{