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 "该路径文件已经存在"