分享你我的心得.
共乘一片美好网络.

hg320路由Tomato固件下检测Aria2进程,没有就开启

 

[Code]while [ 1 ] ; do
if [ $(ps | grep “aria2c” | grep -v “grep” | wc -l) -eq 0 ] ; then
echo “start aria2”
aria2c –conf-path=/tmp/mnt/sda1/opt/bin/aria2.conf -D
aria2c –event-poll=select –enable-rpc –rpc-listen-all=true –rpc-allow-origin-all –dir=/tmp/mnt/sda1/ –file-allocation=none -x 10 -j 10 -c -D
sleep 10s
else
echo “小叶白龙 QQ:5096443”
sleep 10s
fi
done[/Code]

存为aria2.sh脚本

然后在

挂载后运行脚本

中加入一行

 

路径/

aria2.sh

以上代码为守护Aria2进程Shell代码

适用于TT op DD等有Aria2的或是基于Linux的系统

赞(0)
未经允许不得转载:小叶白龙博客 » hg320路由Tomato固件下检测Aria2进程,没有就开启
分享到: 更多 (0)

评论 54

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址