Comments (9)
我觉得没有问题吧,如果无法执行,大概是因为权限问题,readme里的文档有写
#!/bin/bash
downloadpath='/downloads'
filepath=$3
rdp=${filepath#${downloadpath}/}
path=${downloadpath}/${rdp%%/*}
if [ $2 -eq 0 ]
then
exit 0
elif [ "$path" = "$filepath" ] && [ $2 -eq 1 ]
then
[ -e "$filepath".aria2 ] && rm -vf "$filepath".aria2
exit 0
elif [ "$path" != "$filepath" ] && [ $2 -gt 1 ]
then
[ -e "$path".aria2 ] && rm -vf "$path".aria2
exit 0
elif [ "$path" != "$filepath" ] && [ $2 -eq 1 ]
then
[ -e "$filepath".aria2 ] && rm -vf "$filepath".aria2
exit 0
fi
from docker-aria2.
新版本好像还是不行,我改成这样就可以
#!/bin/bash
downloadpath='/downloads'
filepath=$3
rdp=${filepath#${downloadpath}/}
path=${downloadpath}/${rdp%%/*}
if [ $2 -eq 0 ]
then
exit 0
elif [ "$path" = "$filepath" ] && [ $2 -eq 1 ]
then
path2=${path%.*}
[ -e "$path2".aria2 ] && rm -f "$path2".aria2
exit 0
elif [ "$path" != "$filepath" ] && [ $2 -gt 1 ]
then
path3=${path%.*}
[ -e "$path3".aria2 ] && rm -f "$path3".aria2
exit 0
elif [ "$path" != "$filepath" ] && [ $2 -eq 1 ]
then
path4=${path%.*}
[ -e "$path4".aria2 ] && rm -f "$path4".aria2
exit 0
fi
from docker-aria2.
今天抽时间研究了一下aria2的参数传递,更新了删除文件的脚本,经过测试删除功能正常运行,删除功能已完善
from docker-aria2.
我在群晖里面还是不行,$3是带有扩展名的~你的这个删除时有扩展名就出错
from docker-aria2.
from docker-aria2.
我的建议是你删除容器,重新建一个,脚本估计是因为你修改过所以没被替换
你可以进容器 cat /aria2/script/delete.sh 看一下是否是新的脚本
from docker-aria2.
容器更新过了,我容器看过了,是最新的脚本。
后来不行,我自定义的脚本也换成你的最新版了。结果还是不行
我用echo [$(date)] $filepath "
" >> /config/_log.html输出记录的是
/downloads/abcd/abcd.mp4之类的,
[Wed Feb 26 19:19:33 CST 2020] m1 , /downloads/trackers_all.txt
[Wed Feb 26 20:59:41 CST 2020] m3 , /downloads/abcd.mp4
但是.aria2文件是/downloads/abcd.aria2
感觉应该是你的filepath直接用的$3,是带扩展名的,你的脚本目前只有dirpath是正确的,其他的只要用[ -e "$filepath".aria2 ] && rm -vf "$filepath".aria2都会变成/downloads/abcd/abcd.mp4.aria2这样的就删除失败了。。。。
#!/bin/bash
downloadpath='/downloads'
filepath=$3
rdp=${filepath#${downloadpath}/}
path=${downloadpath}/${rdp%%/}
dirpath=${filepath%/}
if [ $2 -eq 0 ]
then
exit 0
elif [ "$path" = "$filepath" ] && [ $2 -eq 1 ]
then
[ -e "$filepath".aria2 ] && rm -vf "$filepath".aria2
echo [$(date)] m1 , $filepath "
" >> /config/_log.html
exit 0
elif [ "$path" != "$filepath" ] && [ $2 -gt 1 ]
then
[ -e "$dirpath".aria2 ] && rm -vf "$dirpath".aria2
echo [$(date)] m2 , $dirpath "
" >> /config/_log.html
exit 0
elif [ "$path" != "$filepath" ] && [ $2 -eq 1 ]
then
[ -e "$dirpath".aria2 ] && rm -vf "$filepath".aria2
echo [$(date)] m1 ,$dirpath "
" >> /config/_log.html
exit 0
from docker-aria2.
from docker-aria2.
都说了按输出的记录显示filepath内容使用扩展名的,你用dirpath之类的都是对的,但是用filepath输出的都带扩展名。
[Wed Feb 26 19:19:33 CST 2020] m1 , /downloads/trackers_all.txt
"$filepath" 的内容是 /downloads/abcd.mp4 ,所以命令输出就会变成/downloads/abcd.mp4.aria2
是不是DSM6.22这个群晖系统有问题??
from docker-aria2.
Related Issues (20)
- 保存下载地址到日志文件
- 纯小白 请问yourtoken怎么设置
- 可否增加一项可能,按BT文件名保存 HOT 1
- webui未能成功连接aria2 HOT 6
- 访问8080报错,这是什么原因造成的 HOT 1
- 文件下载失败
- 文件过滤不工作 HOT 1
- docker-compose.yml缩进错误
- 新建任务根本就不下载,接着就移到已结束/已停止 HOT 2
- 大佬 文件过滤设置了不生效 请看截图
- 今天最新的 Docker 镜像运行有问题 HOT 2
- 自从更新4月12日版本后,报如下错误:2023/05/08 18:42:24 open /etc/wireproxy/config: no such file or directory HOT 1
- 启动报错: /run/s6/basedir/scripts/rc.init: line 42: --config: not found
- ariang网页修改配置不生效
- 下载的大文件md5值发生变化。 HOT 1
- Docker log出现错误日志 HOT 3
- 下载无速度问题 HOT 1
- ariang 不能够使用 HOT 1
- 启动报错
- AriaNG无法从ipv6地址访问 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-aria2.