From bbf2eaa789d684fb14481b38a441b134e7349ca9 Mon Sep 17 00:00:00 2001 From: lsy Date: Fri, 26 Jul 2024 19:26:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E9=98=BF=E9=87=8C=E4=BA=91=E7=9B=98?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E8=B7=AF=E5=BE=84=E6=8D=A2=E6=88=90=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Automation/backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config/Automation/backup.sh b/Config/Automation/backup.sh index 25d87e0..5855c15 100644 --- a/Config/Automation/backup.sh +++ b/Config/Automation/backup.sh @@ -63,6 +63,7 @@ if [[ ! $aliyun_pick =~ [Nn] ]];then ./aliyunpan login else echo "检测到阿里云盘已经存在,请确认是否登录" + cd aliyunpan ./aliyunpan who fi fi @@ -71,7 +72,6 @@ cat > "${path}/backup.sh" << EOF #!/bin/bash declare date_time=$(date +"%Y_%m_%d") # 日期格式 declare year=$(date +"%Y") #年份 -cd "${path}/aliyunpan" source "${path}/venv/bin/activate" for item in "$web_path"/*; do @@ -79,7 +79,7 @@ for item in "$web_path"/*; do cd "\$item" || exit tar -czf "\${item_name}_\${date_time}.tar.gz" . bypy upload "\${item_name}_\${date_time}.tar.gz" "/\${item_name}/" - ./aliyunpan upload "\${item_name}_\${date_time}.tar.gz" "/网站/\${item_name}/\${year}/" + ${path}/aliyunpan/aliyunpan upload "\${item_name}_\${date_time}.tar.gz" "/网站/\${item_name}/\${year}/" cp "\${item_name}_\${date_time}.tar.gz" "${web_path}/\${year}/" rm "\${item_name}_\${date_time}.tar.gz" done