From c84211da775b0eccd1eb7c9821b42df49c40404b Mon Sep 17 00:00:00 2001 From: lsy Date: Thu, 12 Sep 2024 11:16:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=84=9A=E6=9C=AC=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Automation/backup.sh | 5 ++--- Config/Automation/update.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Config/Automation/backup.sh b/Config/Automation/backup.sh index 696270f..f5a23d8 100644 --- a/Config/Automation/backup.sh +++ b/Config/Automation/backup.sh @@ -1,7 +1,7 @@ #!/bin/bash -declare path=$1 -declare cron=$2 +declare path="$1" +declare cron="$2" declare web_path declare local_pick declare baidu_pick @@ -92,7 +92,6 @@ chmod +x "$path/backup.sh" declare cron_job="${cron} ${path}/backup.sh" (crontab -l 2>/dev/null | grep -v "backup.sh") | sudo crontab - -(crontab -l 2>/dev/null; echo "$cron_job") | sudo crontab - sudo systemctl restart cron 2>> /dev/null || echo "自动任务重启失败" diff --git a/Config/Automation/update.sh b/Config/Automation/update.sh index d564c0a..4391ce2 100644 --- a/Config/Automation/update.sh +++ b/Config/Automation/update.sh @@ -1,5 +1,5 @@ -declare path=$1 -declare cron=$2 +declare path="$1" +declare cron="$2" if [[ -f "${path}/update.sh" ]];then echo "该路径文件已经存在"